mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 19:06:37 +00:00
Adminer: Fix and simplify previous auto-login feature (controlled by Default Setting).
This commit is contained in:
@@ -453,13 +453,17 @@
|
||||
echo "<ul class='dropdown-menu'>\n";
|
||||
foreach ($menu_parent['menu_items'] as $index_sub => $menu_sub) {
|
||||
$mod_a_2 = $menu_sub['menu_item_link'];
|
||||
if($mod_a_2 == ''){
|
||||
if ($mod_a_2 == '') {
|
||||
$mod_a_2 = '#';
|
||||
}
|
||||
else if (($menu_sub['menu_item_category'] == 'internal') ||
|
||||
(($menu_sub['menu_item_category'] == 'external') && substr($mod_a_2, 0,1) == "/"))
|
||||
{
|
||||
$mod_a_2 = PROJECT_PATH . $mod_a_2;
|
||||
else if (($menu_sub['menu_item_category'] == 'internal') || (($menu_sub['menu_item_category'] == 'external') && substr($mod_a_2,0,1) == '/')) {
|
||||
// accomodate adminer auto-login, if enabled
|
||||
if (substr($mod_a_2,0,22) == '/app/adminer/index.php') {
|
||||
global $db_type;
|
||||
$mod_a_2 .= '?'.(($db_type == 'mysql') ? 'server' : $db_type).'&db=fusionpbx&ns=public';
|
||||
$mod_a_2 .= ($_SESSION['adminer']['auto_login']['boolean'] == 'true') ? "&username=auto" : null;
|
||||
}
|
||||
$mod_a_2 = PROJECT_PATH.$mod_a_2;
|
||||
}
|
||||
$mod_a_3 = ($menu_sub['menu_item_category'] == 'external') ? "target='_blank' " : null;
|
||||
if ($_SESSION['theme']['menu_sub_icons']['boolean'] != 'false') {
|
||||
|
||||
Reference in New Issue
Block a user