diff --git a/main.php b/main.php index bd4671ee7..8a4b3bfa8 100644 --- a/main.php +++ b/main.php @@ -54,56 +54,49 @@ $short_server_info = (!empty($GLOBALS['cfg']['Server']['verbose']) echo '
' . "\n"; echo '
'; -echo '
'; -echo '

' . $strActions . '

'; -echo '
    '; -/** - * Displays the MySQL servers choice form - */ -if (! $cfg['LeftDisplayServers'] && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) { - echo '
  • '; - require_once './libraries/select_server.lib.php'; - PMA_select_server(true, true); - echo '
  • '; -} +if ($server > 0 + || (! $cfg['LeftDisplayServers'] && count($cfg['Servers']) > 1)) { + echo '
    '; + echo '

    ' . $strActions . '

    '; + echo '
      '; -/** - * Displays the mysql server related links - */ -if ($server > 0) { - require_once './libraries/check_user_privileges.lib.php'; - $is_superuser = PMA_isSuperuser(); - - if ($cfg['Server']['auth_type'] == 'config') { - $cfg['ShowChgPassword'] = false; + /** + * Displays the MySQL servers choice form + */ + if (! $cfg['LeftDisplayServers'] + && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) { + echo '
    • '; + require_once './libraries/select_server.lib.php'; + PMA_select_server(true, true); + echo '
    • '; } /** - * Change password - * - * @todo ? needs another message + * Displays the mysql server related links */ - if ($cfg['ShowChgPassword']) { - PMA_printListItem($strChangePassword, 'li_change_password', - './user_password.php?' . $common_url_query); - } // end if + if ($server > 0) { + require_once './libraries/check_user_privileges.lib.php'; - // Logout for advanced authentication - if ($cfg['Server']['auth_type'] != 'config') { - $http_logout = ($cfg['Server']['auth_type'] == 'http') - ? '' - . ($cfg['ReplaceHelpImg'] ? 'Info' : '(*)') . '' - : ''; - PMA_printListItem('' . $strLogout . ' ' . $http_logout, - 'li_log_out', - './index.php?' . $common_url_query . '&old_usr=' . urlencode($PHP_AUTH_USER), null, '_parent'); - } // end if + // Logout for advanced authentication + if ($cfg['Server']['auth_type'] != 'config') { + PMA_printListItem($strChangePassword, 'li_change_password', + './user_password.php?' . $common_url_query); -} // end of if ($server > 0) + $http_logout = ($cfg['Server']['auth_type'] == 'http') + ? '' + . ($cfg['ReplaceHelpImg'] ? 'Info' : '(*)') . '' + : ''; + PMA_printListItem('' . $strLogout . ' ' . $http_logout, + 'li_log_out', + './index.php?' . $common_url_query . '&old_usr=' . urlencode($PHP_AUTH_USER), null, '_parent'); + } // end if + } // end of if ($server > 0) + + echo '
    '; + echo '
    '; +} -echo '
'; -echo '
'; if ($server > 0) { echo '
';