Skip to content

Commit

Permalink
isSuperuser() is also a part of DatabaseInterface class
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuracj committed May 26, 2013
1 parent 5c9941a commit 50b0eed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libraries/common.inc.php
Expand Up @@ -1141,7 +1141,8 @@

// here, the function does not exist with this configuration:
// $cfg['ServerDefault'] = 0;
$GLOBALS['is_superuser'] = function_exists('PMA_isSuperuser') && $GLOBALS['dbi']->isSuperuser();
$GLOBALS['is_superuser']
= isset($GLOBALS['dbi']) && $GLOBALS['dbi']->isSuperuser();

if (!empty($__redirect) && in_array($__redirect, $goto_whitelist)) {
/**
Expand Down
2 changes: 1 addition & 1 deletion server_status_monitor.php
Expand Up @@ -772,7 +772,7 @@ function PMA_getClientSideDataAndLinksHtml($ServerStatusData)
$form = '<form id="js_data" class="hide">';
$form .= sprintf($input, 'server_time', microtime(true) * 1000);
$form .= sprintf($input, 'server_os', PHP_OS);
$form .= sprintf($input, 'is_superuser', PMA_isSuperuser());
$form .= sprintf($input, 'is_superuser', $GLOBALS['dbi']->isSuperuser());
$form .= sprintf($input, 'server_db_isLocal', $ServerStatusData->db_isLocal);
$form .= '</form>';
/**
Expand Down

0 comments on commit 50b0eed

Please sign in to comment.