diff --git a/config.inc.php3 b/config.inc.php3 index cca0ac546..0280b5e54 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -42,13 +42,19 @@ $cfgServers[1]['host'] = 'localhost'; // MySQL hostname $cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port $cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for default socket $cfgServers[1]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket') -$cfgServers[1]['stduser'] = ''; // MySQL standard user settings (this user must have read-only -$cfgServers[1]['stdpass'] = ''; // access to the "mysql/user" and "mysql/db" tables) -$cfgServers[1]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? +$cfgServers[1]['controluser'] = ''; // MySQL control user settings + // (this user must have read-only +$cfgServers[1]['controlpass'] = ''; // access to the "mysql/user" + // and "mysql/db" tables) +$cfgServers[1]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? $cfgServers[1]['user'] = 'root'; // MySQL user -$cfgServers[1]['password'] = ''; // MySQL password (only needed with 'config' auth) -$cfgServers[1]['only_db'] = ''; // If set to a db-name, only this db is displayed at left frame - // It may also be an array of db-names +$cfgServers[1]['password'] = ''; // MySQL password (only needed + // with 'config' auth_type) +$cfgServers[1]['only_db'] = ''; // If set to a db-name, only + // this db is displayed + // at left frame + // It may also be an array + // of db-names $cfgServers[1]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname $cfgServers[1]['bookmarkdb'] = ''; // Bookmark db - leave blank for no bookmark support $cfgServers[1]['bookmarktable'] = ''; // Bookmark table - leave blank for no bookmark support @@ -59,8 +65,8 @@ $cfgServers[2]['host'] = ''; $cfgServers[2]['port'] = ''; $cfgServers[2]['socket'] = ''; $cfgServers[2]['connect_type'] = 'tcp'; -$cfgServers[2]['stduser'] = ''; -$cfgServers[2]['stdpass'] = ''; +$cfgServers[2]['controluser'] = ''; +$cfgServers[2]['controlpass'] = ''; $cfgServers[2]['auth_type'] = 'config'; $cfgServers[2]['user'] = 'root'; $cfgServers[2]['password'] = ''; @@ -74,8 +80,8 @@ $cfgServers[3]['host'] = ''; $cfgServers[3]['port'] = ''; $cfgServers[3]['socket'] = ''; $cfgServers[3]['connect_type'] = 'tcp'; -$cfgServers[3]['stduser'] = ''; -$cfgServers[3]['stdpass'] = ''; +$cfgServers[3]['controluser'] = ''; +$cfgServers[3]['controlpass'] = ''; $cfgServers[3]['auth_type'] = 'config'; $cfgServers[3]['user'] = 'root'; $cfgServers[3]['password'] = ''; diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index a2cf9f88f..a6dea1196 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -71,8 +71,9 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ include('./config.inc.php3'); // For compatibility with old config.inc.php3 + if (!isset($cfgExecTimeLimit)) { - $cfgExecTimeLimit = 300; // 5 minuts + $cfgExecTimeLimit = 300; // 5 minutes } if (!isset($cfgShowStats)) { $cfgShowStats = TRUE; @@ -424,6 +425,11 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ : 'config'; } + if (isset($cfgServer['stduser'])) { + $cfgServer['controluser'] = $cfgServer['stduser']; + $cfgServer['controlpass'] = $cfgServer['stdpass']; + } + // Gets the authentication library that fits the cfgServer settings // and run authentication include('./libraries/auth/' . $cfgServer['auth_type'] . '.auth.lib.php3'); @@ -446,15 +452,15 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ $bkp_track_err = @ini_set('track_errors', 1); } - // Try to connect MySQL with the standard user profile (will be used to + // Try to connect MySQL with the control user profile (will be used to // get the privileges list for the current user but the true user link // must be open after this one so it would be default one for all the // scripts) - if ($cfgServer['stduser'] != '') { + if ($cfgServer['controluser'] != '') { $dbh = @$connect_func( $cfgServer['host'] . $server_port . $server_socket, - $cfgServer['stduser'], - $cfgServer['stdpass'] + $cfgServer['controluser'], + $cfgServer['controlpass'] ); if ($dbh == FALSE) { if (mysql_error()) { @@ -466,7 +472,7 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ } $local_query = $connect_func . '(' . $cfgServer['host'] . $server_port . $server_socket . ', ' - . $cfgServer['stduser'] . ', ' + . $cfgServer['controluser'] . ', ' . $cfgServer['stdpass'] . ')'; PMA_mysqlDie($conn_error, $local_query, FALSE); } // end if @@ -486,9 +492,9 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ @ini_set('track_errors', $bkp_track_err); } - // If stduser isn't defined, use the current user settings to get his + // If controluser isn't defined, use the current user settings to get his // rights - if ($cfgServer['stduser'] == '') { + if ($cfgServer['controluser'] == '') { $dbh = $userlink; }