[FIX] mpos compatibility for icons in navigation

This commit is contained in:
iAmShorty 2014-03-10 09:36:50 +01:00
parent 6b1bceabdf
commit 7bc6ec9ace
2 changed files with 10 additions and 5 deletions

View File

@ -125,16 +125,16 @@ if (@$_SESSION['USERDATA']['is_admin'] && $user->isAdmin(@$_SESSION['USERDATA'][
// display the errors // display the errors
foreach ($enotice as $en) { foreach ($enotice as $en) {
$_SESSION['POPUP'][] = array('CONTENT' => $en, 'TYPE' => 'info'); $_SESSION['POPUP'][] = array('CONTENT' => $en, 'TYPE' => 'alert alert-info');
} }
if (!count($notice) && !count($error)) { if (!count($notice) && !count($error)) {
$_SESSION['POPUP'][] = array('CONTENT' => 'The config options we checked seem OK', 'TYPE' => 'success'); $_SESSION['POPUP'][] = array('CONTENT' => 'The config options we checked seem OK', 'TYPE' => 'alert alert-success');
} else { } else {
foreach ($notice as $n) { foreach ($notice as $n) {
$_SESSION['POPUP'][] = array('CONTENT' => $n, 'TYPE' => 'warning'); $_SESSION['POPUP'][] = array('CONTENT' => $n, 'TYPE' => 'alert alert-warning');
} }
foreach ($error as $e) { foreach ($error as $e) {
$_SESSION['POPUP'][] = array('CONTENT' => $e, 'TYPE' => 'errormsg'); $_SESSION['POPUP'][] = array('CONTENT' => $e, 'TYPE' => 'alert alert-danger');
} }
} }
} }

View File

@ -5,7 +5,12 @@ function check_acl_access($params, $smarty)
{ {
$isAuthenticated = isset($_SESSION['AUTHENTICATED']) ? true : false; $isAuthenticated = isset($_SESSION['AUTHENTICATED']) ? true : false;
$iAclSetting = $params['acl']; $iAclSetting = $params['acl'];
$sUrl = '<li><a href="'.$_SERVER['SCRIPT_NAME'].'?page='.$params['page'].'&action='.$params['action'].'">'.$params['name'].'</a></li>'; // $params['icon'] is deprecated, only needed for mpos compatibility
if (isset($params['icon'])) {
$sUrl = '<li class="'.$params['icon'].'"><a href="'.$_SERVER['SCRIPT_NAME'].'?page='.$params['page'].'&action='.$params['action'].'">'.$params['name'].'</a></li>';
} else {
$sUrl = '<li><a href="'.$_SERVER['SCRIPT_NAME'].'?page='.$params['page'].'&action='.$params['action'].'">'.$params['name'].'</a></li>';
}
if (isset($params['fallback'])) if (isset($params['fallback']))
$sFallbackUrl = '<li><a href="'.$_SERVER['SCRIPT_NAME'].'?page='.$params['page'].'">'.$params['name'].'</a></li>'; $sFallbackUrl = '<li><a href="'.$_SERVER['SCRIPT_NAME'].'?page='.$params['page'].'">'.$params['name'].'</a></li>';
switch($iAclSetting) { switch($iAclSetting) {