bug fix: check user is logged

This commit is contained in:
Diego Najar 2018-08-01 22:04:28 +02:00
parent a515a588b2
commit 5cdef56023
3 changed files with 6 additions and 5 deletions

View File

@ -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]);

View File

@ -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"
});

View File

@ -32,7 +32,9 @@
<!-- Shows "read more" button if necessary -->
<?php if ($page->readMore()): ?>
<div class="text-right pt-3">
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $Language->get('Read more'); ?></a>
</div>
<?php endif ?>
<!-- Load Bludit Plugins: Page End -->