Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Foellmann <foellmann@foe-services.de>2015-01-05 22:07:18 +0300
committerChristian Foellmann <foellmann@foe-services.de>2015-01-05 22:07:18 +0300
commit170cb05f4eec4322303658108f9eea6e55163e50 (patch)
treee9b7e9a7e287270392077d1099fe0b5dc54eeba1 /libraries/server_privileges.lib.php
parentf3a2bbe4d8241664dbb92def1b413b616bfab1fd (diff)
UPDATE 4.3.54.3.5
Diffstat (limited to 'libraries/server_privileges.lib.php')
-rw-r--r--libraries/server_privileges.lib.php26
1 files changed, 15 insertions, 11 deletions
diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php
index 084bf2c4fb..93e101cde7 100644
--- a/libraries/server_privileges.lib.php
+++ b/libraries/server_privileges.lib.php
@@ -526,10 +526,11 @@ function PMA_getHtmlToChooseUserGroup($username)
$html_output .= '<fieldset id="fieldset_user_group_selection">';
$html_output .= '<legend>' . __('User group') . '</legend>';
- $groupTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
- . "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['usergroups']);
- $userTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
- . "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['users']);
+ $cfgRelation = PMA_getRelationsParam();
+ $groupTable = PMA_Util::backquote($cfgRelation['db'])
+ . "." . PMA_Util::backquote($cfgRelation['usergroups']);
+ $userTable = PMA_Util::backquote($cfgRelation['db'])
+ . "." . PMA_Util::backquote($cfgRelation['users']);
$userGroups = array();
$sql_query = "SELECT DISTINCT `usergroup` FROM " . $groupTable;
@@ -577,8 +578,9 @@ function PMA_getHtmlToChooseUserGroup($username)
*/
function PMA_setUserGroup($username, $userGroup)
{
- $userTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
- . "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['users']);
+ $cfgRelation = PMA_getRelationsParam();
+ $userTable = PMA_Util::backquote($cfgRelation['db'])
+ . "." . PMA_Util::backquote($cfgRelation['users']);
$sql_query = "SELECT `usergroup` FROM " . $userTable
. " WHERE `username` = '" . PMA_Util::sqlAddSlashes($username) . "'";
@@ -2306,8 +2308,9 @@ function PMA_getUserGroupEditLink($username)
*/
function PMA_getUserGroupCount()
{
- $user_group_table = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
- . '.' . PMA_Util::backquote($GLOBALS['cfg']['Server']['usergroups']);
+ $cfgRelation = PMA_getRelationsParam();
+ $user_group_table = PMA_Util::backquote($cfgRelation['db'])
+ . '.' . PMA_Util::backquote($cfgRelation['usergroups']);
$sql_query = 'SELECT COUNT(*) FROM ' . $user_group_table;
$user_group_count = $GLOBALS['dbi']->fetchValue(
$sql_query, 0, 0, $GLOBALS['controllink']
@@ -3016,9 +3019,10 @@ function PMA_getUsersOverview($result, $db_rights, $pmaThemeImage, $text_dir)
*/
function PMA_getHtmlTableBodyForUserRights($db_rights)
{
- if ($GLOBALS['cfgRelation']['menuswork']) {
- $users_table = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb'])
- . "." . PMA_Util::backquote($GLOBALS['cfg']['Server']['users']);
+ $cfgRelation = PMA_getRelationsParam();
+ if ($cfgRelation['menuswork']) {
+ $users_table = PMA_Util::backquote($cfgRelation['db'])
+ . "." . PMA_Util::backquote($cfgRelation['users']);
$sql_query = 'SELECT * FROM ' . $users_table;
$result = PMA_queryAsControlUser($sql_query, false);
$group_assignment = array();