From 5cdef56023c7bd436bfb00a518c1fa2f0cda6f36 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Wed, 1 Aug 2018 22:04:28 +0200 Subject: [PATCH] bug fix: check user is logged --- bl-kernel/dbpages.class.php | 4 +++- bl-kernel/js/bludit-ajax.php | 5 +---- bl-themes/alternative/php/home.php | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index cd649891..8f6acf25 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -58,7 +58,9 @@ class dbPages extends dbJSON { // Check values on args and set default values if not exists foreach ($this->dbFields as $field=>$value) { if ($field=='tags') { - $finalValue = $this->generateTags($args['tags']); + if (!empty($args['tags'])) { + $finalValue = $this->generateTags($args['tags']); + } } elseif (isset($args[$field])) { // Sanitize if will be stored on database $finalValue = Sanitize::html($args[$field]); diff --git a/bl-kernel/js/bludit-ajax.php b/bl-kernel/js/bludit-ajax.php index 880685c2..58916e69 100644 --- a/bl-kernel/js/bludit-ajax.php +++ b/bl-kernel/js/bludit-ajax.php @@ -48,10 +48,7 @@ class bluditAjax { console.log("[INFO] [BLUDIT AJAX] [userLogged()] Checking if the user is logged."); ajaxRequest = $.ajax({ - type: "POST", - data: { - tokenCSRF: tokenCSRF // token from env variables - }, + type: "GET", url: HTML_PATH_ADMIN_ROOT+"ajax/user-logged" }); diff --git a/bl-themes/alternative/php/home.php b/bl-themes/alternative/php/home.php index 6a2862a2..75195bd2 100644 --- a/bl-themes/alternative/php/home.php +++ b/bl-themes/alternative/php/home.php @@ -32,7 +32,9 @@ readMore()): ?> +
get('Read more'); ?> +