commit 9edfe0886a08491b68c18626b139d8c0c1f42a32
parent 475a7af08aafd199832da86f32fcce17f54a4b7d
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 23 Nov 2014 16:13:37 +0100
I NEED MORE IFs :D
Diffstat:
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php
@@ -13,14 +13,17 @@
printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error());
exit();
}
- if ($resultat = $connection->query('SELECT * FROM posts WHERE id LIKE '.$id)) {
- while($daten = $resultat->fetch_object() ){
- $post_id_clean = $daten->id;
+ if ($read != 0){
+ if ($resultat = $connection->query('SELECT * FROM posts WHERE id LIKE '.$id)) {
+ while($daten = $resultat->fetch_object() ){
+ $post_id_clean = $daten->id;
+ }
+ $resultat->close();
}
- $resultat->close();
- }
- read();
+ read();
+ }
+
function read(){
global $id, $connection, $read;
global $post_id, $post_title, $post_text, $post_author, $post_date, $post_categrory;