bug fix: check user is logged
This commit is contained in:
parent
a515a588b2
commit
5cdef56023
|
@ -58,7 +58,9 @@ class dbPages extends dbJSON {
|
||||||
// Check values on args and set default values if not exists
|
// Check values on args and set default values if not exists
|
||||||
foreach ($this->dbFields as $field=>$value) {
|
foreach ($this->dbFields as $field=>$value) {
|
||||||
if ($field=='tags') {
|
if ($field=='tags') {
|
||||||
|
if (!empty($args['tags'])) {
|
||||||
$finalValue = $this->generateTags($args['tags']);
|
$finalValue = $this->generateTags($args['tags']);
|
||||||
|
}
|
||||||
} elseif (isset($args[$field])) {
|
} elseif (isset($args[$field])) {
|
||||||
// Sanitize if will be stored on database
|
// Sanitize if will be stored on database
|
||||||
$finalValue = Sanitize::html($args[$field]);
|
$finalValue = Sanitize::html($args[$field]);
|
||||||
|
|
|
@ -48,10 +48,7 @@ class bluditAjax {
|
||||||
console.log("[INFO] [BLUDIT AJAX] [userLogged()] Checking if the user is logged.");
|
console.log("[INFO] [BLUDIT AJAX] [userLogged()] Checking if the user is logged.");
|
||||||
|
|
||||||
ajaxRequest = $.ajax({
|
ajaxRequest = $.ajax({
|
||||||
type: "POST",
|
type: "GET",
|
||||||
data: {
|
|
||||||
tokenCSRF: tokenCSRF // token from env variables
|
|
||||||
},
|
|
||||||
url: HTML_PATH_ADMIN_ROOT+"ajax/user-logged"
|
url: HTML_PATH_ADMIN_ROOT+"ajax/user-logged"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
|
|
||||||
<!-- Shows "read more" button if necessary -->
|
<!-- Shows "read more" button if necessary -->
|
||||||
<?php if ($page->readMore()): ?>
|
<?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>
|
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $Language->get('Read more'); ?></a>
|
||||||
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
|
|
Loading…
Reference in New Issue