>
-
+ isSuperuser() || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
enableBc();
- $GLOBALS['is_superuser'] = true;
$GLOBALS['table'] = "table";
$GLOBALS['replication_info']['master']['status'] = false;
diff --git a/test/classes/Server/PrivilegesTest.php b/test/classes/Server/PrivilegesTest.php
index 5be2963a529a..a421b2a63803 100644
--- a/test/classes/Server/PrivilegesTest.php
+++ b/test/classes/Server/PrivilegesTest.php
@@ -127,7 +127,6 @@ public function setUp()
->will($this->returnArgument(0));
$GLOBALS['dbi'] = $dbi;
- $GLOBALS['is_superuser'] = true;
$GLOBALS['is_grantuser'] = true;
$GLOBALS['is_createuser'] = true;
$GLOBALS['is_reload_priv'] = true;
@@ -1475,6 +1474,8 @@ public function testPMAGetHtmlForSpecificDbPrivileges()
array('COLUMN_NAME' => 'Host', 'CHARACTER_MAXIMUM_LENGTH' => 80),
array('COLUMN_NAME' => 'User', 'CHARACTER_MAXIMUM_LENGTH' => 40),
);
+ $dbi->expects($this->any())->method('isSuperuser')
+ ->will($this->returnValue(true));
$dbi->expects($this->any())->method('fetchResult')
->will($this->returnValue($fields_info));
$dbi->expects($this->any())
@@ -1558,6 +1559,8 @@ public function testPMAGetHtmlForSpecificTablePrivileges()
$dbi->expects($this->any())
->method('escapeString')
->will($this->returnArgument(0));
+ $dbi->expects($this->any())->method('isSuperuser')
+ ->will($this->returnValue(true));
$GLOBALS['dbi'] = $dbi;
diff --git a/test/classes/Server/UsersTest.php b/test/classes/Server/UsersTest.php
index c3fbb0596426..a9577a1004c2 100644
--- a/test/classes/Server/UsersTest.php
+++ b/test/classes/Server/UsersTest.php
@@ -26,6 +26,7 @@ class UsersTest extends TestCase
*/
public function testGetHtmlForSubMenusOnUsersPage()
{
+ $GLOBALS['server'] = 1;
$html = Users::getHtmlForSubMenusOnUsersPage('server_privileges.php');
//validate 1: topmenu2
|