mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 04:41:53 +02:00
Issue #5481 Added pref for displaying debug navigation button in admin area.
This commit is contained in:
@@ -759,6 +759,14 @@ $text .= "
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for='admin-collapse-sidebar'>".PRFLAN_287."</label></td>
|
||||
<td>
|
||||
".$e_userclass->uc_dropdown('admin_navbar_debug', $pref['admin_navbar_debug'], 'nobody,main,admin,classes,no-excludes', "tabindex='".$frm->getNext()."'")."
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
@@ -464,18 +464,26 @@ function update_core_prefs($type='')
|
||||
$should = get_default_prefs();
|
||||
|
||||
$just_check = !($type == 'do'); // TRUE if we're just seeing if an update is needed
|
||||
|
||||
|
||||
$missing = [];
|
||||
|
||||
foreach ($should as $k => $v)
|
||||
{
|
||||
if ($k && !array_key_exists($k,$pref))
|
||||
{
|
||||
if ($just_check) return update_needed('Missing pref: '.$k);
|
||||
$missing[] = $k;
|
||||
// $pref[$k] = $v;
|
||||
e107::getConfig()->set($k,$v);
|
||||
$admin_log->logMessage($k.' => '.$v, E_MESSAGE_NODISPLAY, E_MESSAGE_INFO);
|
||||
$do_save = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ($just_check && !empty($missing))
|
||||
{
|
||||
return update_needed('<br>Missing prefs: <ul><li>'.implode('</li><li>',$missing).'</li></ul>');
|
||||
}
|
||||
|
||||
if ($do_save)
|
||||
{
|
||||
//save_prefs();
|
||||
|
Reference in New Issue
Block a user