commit 2581a7b9bb1ed043678e316d2e51a5d31e389941
parent f457d881eebdcbbe12d3d9e0e4d0d56057d79207
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 14 Dec 2014 11:08:33 +0100
php ....
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php
@@ -14,7 +14,7 @@ $root_1 = realpath($_SERVER["DOCUMENT_ROOT"]);
$currentdir = getcwd();
$root_2 = str_replace($root_1, '', $currentdir);
$root_3 = explode("/", $root_2);
-if ($root_3[1] == "core") {
+if ($root_3[1] == 'core') {
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
}else{
$root = $root_1 . '/' . $root_3[1];
@@ -66,7 +66,7 @@ if ($root_3[1] == "core") {
function read_only(){
global $id, $connection, $read, $post_id_clean;
global $post_id, $post_title, $post_text, $post_author, $post_date, $post_category, $post_text_short;
- if ($resultat = $connection->query("SELECT id,title,text,author,category,date FROM posts WHERE id LIKE '$id'")) {
+ if ($resultat = $connection->query("SELECT * FROM posts WHERE id LIKE '$id'")) {
//echo 'SELECT * FROM posts WHERE id LIKE '.$id;
//Put database data in variables
while($daten = $resultat->fetch_object() ){
@@ -99,7 +99,7 @@ if ($root_3[1] == "core") {
function read_category(){
global $id, $category, $connection, $read, $category_id_clean;
global $post_id, $post_title, $post_text, $post_author, $post_date, $post_category, $post_text_short;
- if ($resultat = $connection->query("SELECT id,title,text,author,category,date FROM posts WHERE category LIKE '$category' AND id LIKE '$id'")) {
+ if ($resultat = $connection->query("SELECT * FROM posts WHERE category LIKE '$category' AND id LIKE '$id'")) {
//echo 'SELECT * FROM posts WHERE id LIKE '.$id;
//Put database data in variables
while($daten = $resultat->fetch_object() ){