Merged patch #452877 ($cfgServer['only_db'] - array) from Jakub Wilk
This commit is contained in:
@@ -31,6 +31,9 @@ $Source$
|
||||
* lib.inc.php3, line 524: beautify a bit the way the query is displayed.
|
||||
* lang/english.inc.php3; lang/french.inc.php3: put $strInstructions at its
|
||||
right place.
|
||||
* lib.inc.php3, lines 196-200; config.inc.php3, line 40;
|
||||
Documentation.html, lines 352-357: merged patch #452877
|
||||
($cfgServer['only_db'] - array) from Jakub Wilk.
|
||||
|
||||
2001-08-18 Robin Johnson <robbat2@orbis-terrarum.net>
|
||||
* lib.inc.php3 (788, 790) : tweak size for lower resolution screens.
|
||||
|
@@ -349,10 +349,10 @@
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
<dt><b>$cfgServers[n]['only_db']</b> string</dt>
|
||||
<dt><b>$cfgServers[n]['only_db']</b> string or array</dt>
|
||||
<dd>
|
||||
If set to a database name, only this database will be shown to the
|
||||
user.
|
||||
If set to a(an array of) database name(s), only this(these) database(s)
|
||||
will be shown to the user.
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
@@ -543,9 +543,7 @@
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
<b>$cfgLimitChars </b>integer
|
||||
</dt>
|
||||
<dt><b>$cfgLimitChars </b>integer</dt>
|
||||
<dd>
|
||||
Maximal number of Chars showed in a field on browse view.
|
||||
<br /><br />
|
||||
|
119
config.inc.php3
119
config.inc.php3
@@ -29,67 +29,68 @@
|
||||
*/
|
||||
// The $cfgServers array starts with $cfgServers[1]. Do not use $cfgServers[0].
|
||||
// You can disable a server config entry by setting host to ''.
|
||||
$cfgServers[1]['host'] = 'localhost'; // MySQL hostname
|
||||
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port
|
||||
$cfgServers[1]['adv_auth'] = FALSE; // Use advanced authentication?
|
||||
$cfgServers[1]['stduser'] = ''; // MySQL standard user (only needed with advanced auth)
|
||||
$cfgServers[1]['stdpass'] = ''; // MySQL standard password (only needed with advanced auth)
|
||||
$cfgServers[1]['user'] = 'root'; // MySQL user (only needed with basic auth)
|
||||
$cfgServers[1]['password'] = ''; // MySQL password (only needed with basic auth)
|
||||
$cfgServers[1]['only_db'] = ''; // If set to a db-name, only this db is accessible
|
||||
$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
|
||||
$cfgServers[1]['host'] = 'localhost'; // MySQL hostname
|
||||
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port
|
||||
$cfgServers[1]['adv_auth'] = FALSE; // Use advanced authentication?
|
||||
$cfgServers[1]['stduser'] = ''; // MySQL standard user (only needed with advanced auth)
|
||||
$cfgServers[1]['stdpass'] = ''; // MySQL standard password (only needed with advanced auth)
|
||||
$cfgServers[1]['user'] = 'root'; // MySQL user (only needed with basic auth)
|
||||
$cfgServers[1]['password'] = ''; // MySQL password (only needed with basic auth)
|
||||
$cfgServers[1]['only_db'] = ''; // If set to a db-name, only this db is accessible
|
||||
// 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
|
||||
|
||||
$cfgServers[2]['host'] = '';
|
||||
$cfgServers[2]['port'] = '';
|
||||
$cfgServers[2]['adv_auth'] = FALSE;
|
||||
$cfgServers[2]['stduser'] = '';
|
||||
$cfgServers[2]['stdpass'] = '';
|
||||
$cfgServers[2]['user'] = 'root';
|
||||
$cfgServers[2]['password'] = '';
|
||||
$cfgServers[2]['only_db'] = '';
|
||||
$cfgServers[2]['verbose'] = '';
|
||||
$cfgServers[2]['bookmarkdb'] = '';
|
||||
$cfgServers[2]['bookmarktable'] = '';
|
||||
$cfgServers[2]['host'] = '';
|
||||
$cfgServers[2]['port'] = '';
|
||||
$cfgServers[2]['adv_auth'] = FALSE;
|
||||
$cfgServers[2]['stduser'] = '';
|
||||
$cfgServers[2]['stdpass'] = '';
|
||||
$cfgServers[2]['user'] = 'root';
|
||||
$cfgServers[2]['password'] = '';
|
||||
$cfgServers[2]['only_db'] = '';
|
||||
$cfgServers[2]['verbose'] = '';
|
||||
$cfgServers[2]['bookmarkdb'] = '';
|
||||
$cfgServers[2]['bookmarktable'] = '';
|
||||
|
||||
$cfgServers[3]['host'] = '';
|
||||
$cfgServers[3]['port'] = '';
|
||||
$cfgServers[3]['adv_auth'] = FALSE;
|
||||
$cfgServers[3]['stduser'] = '';
|
||||
$cfgServers[3]['stdpass'] = '';
|
||||
$cfgServers[3]['user'] = 'root';
|
||||
$cfgServers[3]['password'] = '';
|
||||
$cfgServers[3]['only_db'] = '';
|
||||
$cfgServers[3]['verbose'] = '';
|
||||
$cfgServers[3]['bookmarkdb'] = '';
|
||||
$cfgServers[3]['bookmarktable'] = '';
|
||||
$cfgServers[3]['host'] = '';
|
||||
$cfgServers[3]['port'] = '';
|
||||
$cfgServers[3]['adv_auth'] = FALSE;
|
||||
$cfgServers[3]['stduser'] = '';
|
||||
$cfgServers[3]['stdpass'] = '';
|
||||
$cfgServers[3]['user'] = 'root';
|
||||
$cfgServers[3]['password'] = '';
|
||||
$cfgServers[3]['only_db'] = '';
|
||||
$cfgServers[3]['verbose'] = '';
|
||||
$cfgServers[3]['bookmarkdb'] = '';
|
||||
$cfgServers[3]['bookmarktable'] = '';
|
||||
|
||||
// If you have more than one server configured, you can set $cfgServerDefault
|
||||
// to any one of them to autoconnect to that server when phpMyAdmin is started,
|
||||
// or set it to 0 to be given a list of servers without logging in
|
||||
// If you have only one server configured, $cfgServerDefault *MUST* be
|
||||
// set to that server.
|
||||
$cfgServerDefault = 1; // Default server (0 = no default server)
|
||||
$cfgServer = '';
|
||||
$cfgServerDefault = 1; // Default server (0 = no default server)
|
||||
$cfgServer = '';
|
||||
unset($cfgServers[0]);
|
||||
|
||||
|
||||
/**
|
||||
* Other core phpMyAdmin settings
|
||||
*/
|
||||
$cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE'
|
||||
$cfgPersistentConnections = FALSE; // use persistent connections to MySQL database
|
||||
$cfgShowBlob = FALSE; // display blob field contents in browse mode
|
||||
$cfgProtectBlob = FALSE; // disallow editing of blob fields in edit mode
|
||||
$cfgShowSQL = TRUE; // show SQL queries as run
|
||||
$cfgSkipLockedTables = FALSE; // mark used tables, make possible to show
|
||||
// locked tables (since MySQL 3.23.30)
|
||||
$cfgMaxRows = 30; // maximum number of rows to display in browse mode
|
||||
$cfgOrder = 'ASC'; // default for 'ORDER BY' clause
|
||||
$cfgOBGzip = TRUE; // GZIP output buffering
|
||||
$cfgGZipDump = TRUE; // Allow the use of gzip/bzip compression
|
||||
$cfgBZipDump = TRUE; // for dump files
|
||||
$cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE'
|
||||
$cfgPersistentConnections = FALSE; // use persistent connections to MySQL database
|
||||
$cfgShowBlob = FALSE; // display blob field contents in browse mode
|
||||
$cfgProtectBlob = FALSE; // disallow editing of blob fields in edit mode
|
||||
$cfgShowSQL = TRUE; // show SQL queries as run
|
||||
$cfgSkipLockedTables = FALSE; // mark used tables, make possible to show
|
||||
// locked tables (since MySQL 3.23.30)
|
||||
$cfgMaxRows = 30; // maximum number of rows to display in browse mode
|
||||
$cfgOrder = 'ASC'; // default for 'ORDER BY' clause
|
||||
$cfgOBGzip = TRUE; // GZIP output buffering
|
||||
$cfgGZipDump = TRUE; // Allow the use of gzip/bzip compression
|
||||
$cfgBZipDump = TRUE; // for dump files
|
||||
|
||||
|
||||
/**
|
||||
@@ -103,9 +104,9 @@ $cfgManualBase = 'http://www.mysql.com/documentation/mysql/bychapter';
|
||||
* Language settings
|
||||
*/
|
||||
// Default language to use, if not browser-defined or user-defined
|
||||
$cfgDefaultLang = 'en';
|
||||
$cfgDefaultLang = 'en';
|
||||
// Force: always use this language - must be defined in select_lang.inc.php3
|
||||
// $cfgLang = 'en';
|
||||
// $cfgLang = 'en';
|
||||
// Loads language file
|
||||
require('./select_lang.inc.php3');
|
||||
|
||||
@@ -113,16 +114,16 @@ require('./select_lang.inc.php3');
|
||||
/**
|
||||
* Customization & design
|
||||
*/
|
||||
$cfgBorder = 0; // border width on tables
|
||||
$cfgThBgcolor = '#D3DCE3'; // table header row colour
|
||||
$cfgBgcolorOne = '#CCCCCC'; // table data row colour
|
||||
$cfgBgcolorTwo = '#DDDDDD'; // table data row colour, alternate
|
||||
$cfgTextareaCols = 40; // textarea size (columns) in edit mode
|
||||
$cfgTextareaRows = 7; // textarea size (rows) in edit mode
|
||||
$cfgLimitChars = 50; // max field data length in browse mode
|
||||
$cfgModifyDeleteAtLeft = TRUE; // show edit/delete links on left side of browse
|
||||
$cfgModifyDeleteAtRight = FALSE; // show edit/delete links on right side of browse
|
||||
$cfgLeftWidth = 150; // left frame width
|
||||
$cfgBorder = 0; // border width on tables
|
||||
$cfgThBgcolor = '#D3DCE3'; // table header row colour
|
||||
$cfgBgcolorOne = '#CCCCCC'; // table data row colour
|
||||
$cfgBgcolorTwo = '#DDDDDD'; // table data row colour, alternate
|
||||
$cfgTextareaCols = 40; // textarea size (columns) in edit mode
|
||||
$cfgTextareaRows = 7; // textarea size (rows) in edit mode
|
||||
$cfgLimitChars = 50; // max field data length in browse mode
|
||||
$cfgModifyDeleteAtLeft = TRUE; // show edit/delete links on left side of browse
|
||||
$cfgModifyDeleteAtRight = FALSE; // show edit/delete links on right side of browse
|
||||
$cfgLeftWidth = 150; // left frame width
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -193,7 +193,11 @@ if (!defined('__LIB_INC__')){
|
||||
|
||||
// The user can work with only one database
|
||||
if (isset($cfgServer['only_db']) && !empty($cfgServer['only_db'])) {
|
||||
$dblist[] = $cfgServer['only_db'];
|
||||
if (is_array($cfgServer['only_db'])) {
|
||||
$dblist = $cfgServer['only_db'];
|
||||
} else {
|
||||
$dblist[] = $cfgServer['only_db'];
|
||||
}
|
||||
}
|
||||
|
||||
// Advanced authentication is required
|
||||
|
Reference in New Issue
Block a user