Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
fix for admin helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
patkon committed Oct 19, 2021
1 parent 647ffb5 commit 97f1dd0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/functions/func_basics.php
Expand Up @@ -285,7 +285,7 @@ function fc_store_admin_helper($trigger,$val) {
global $languagePack;

/* skip this function for visitors */
if($_SESSION['user_class'] != 'administrator') {
if($_SESSION['user_class'] !== 'administrator') {
return;
}

Expand Down
8 changes: 5 additions & 3 deletions index.php
Expand Up @@ -36,7 +36,10 @@

$fc_prefs = fc_get_preferences();
$languagePack = $fc_prefs['prefs_default_language'];
$_SESSION['fc_admin_helpers'] = array();

if($_SESSION['user_class'] == "administrator") {
$_SESSION['fc_admin_helpers'] = array();
}



Expand Down Expand Up @@ -407,7 +410,7 @@
$smarty->assign('prepend_body_code', $prepend_body_code);
$smarty->assign('append_body_code', $append_body_code);


$store = '';
if($_SESSION['user_class'] == "administrator") {
$store = $_SESSION['fc_admin_helpers'];

Expand All @@ -433,7 +436,6 @@
}
}


// display the template
$smarty->display('index.tpl',$cache_id);

Expand Down
2 changes: 2 additions & 0 deletions styles/default/templates/admin_helpers.tpl
@@ -1,3 +1,4 @@
{if $smarty.session.user_class == "administrator"}
<div class="card p-1 mt-2">
<a class="btn btn-secondary w-100" data-bs-toggle="collapse" href="#collapseAdminHelpers" role="button" aria-expanded="false" aria-controls="collapseAdminHelpers">
Admin Helpers
Expand Down Expand Up @@ -43,3 +44,4 @@
</div>
</div>
</div>
{/if}

0 comments on commit 97f1dd0

Please sign in to comment.