removed MySQL < 5 code
This commit is contained in:
@@ -68,27 +68,6 @@ require_once './libraries/List.class.php';
|
||||
$this->build();
|
||||
}
|
||||
|
||||
/**
|
||||
* removes all databases not accessible by current user from list
|
||||
*
|
||||
* @access protected
|
||||
* @uses PMA_List_Database::$items
|
||||
* @uses PMA_List_Database::$_db_link_user
|
||||
* @uses PMA_List_Database::$_need_to_reindex to set it if reuqired
|
||||
* @uses PMA_DBI_select_db()
|
||||
*/
|
||||
function _checkAccess()
|
||||
{
|
||||
foreach ($this->items as $key => $db) {
|
||||
if (! @PMA_DBI_select_db($db, $this->_db_link_user)) {
|
||||
unset($this->items[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
// re-index values
|
||||
$this->_need_to_reindex = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* checks if the configuration wants to hide some databases
|
||||
*
|
||||
@@ -171,8 +150,6 @@ require_once './libraries/List.class.php';
|
||||
* @uses PMA_List_Database::_checkOnlyDatabase()
|
||||
* @uses PMA_List_Database::_retrieve()
|
||||
* @uses PMA_List_Database::_checkHideDatabase()
|
||||
* @uses PMA_List_Database::_checkAccess()
|
||||
* @uses PMA_MYSQL_INT_VERSION
|
||||
* @uses array_values()
|
||||
* @uses natsort()
|
||||
* @uses $cfg['NaturalOrder']
|
||||
@@ -191,12 +168,6 @@ require_once './libraries/List.class.php';
|
||||
|
||||
$this->_checkHideDatabase();
|
||||
|
||||
// Before MySQL 4.0.2, SHOW DATABASES could send the
|
||||
// whole list, so check if we really have access:
|
||||
if (PMA_MYSQL_INT_VERSION < 40002) {
|
||||
$this->_checkAccess();
|
||||
}
|
||||
|
||||
if ($this->_need_to_reindex) {
|
||||
$this->items = array_values($this->items);
|
||||
}
|
||||
|
@@ -465,11 +465,6 @@ $this_url_params = array_merge($url_params,
|
||||
// this choice (InnoDB maintains integrity by itself)
|
||||
|
||||
if ($cfgRelation['relwork'] && $tbl_type != "INNODB") {
|
||||
|
||||
// we need this PMA_DBI_select_db if the user has access to more than one db
|
||||
// and $GLOBALS['db'] is not the last of the list, because
|
||||
// PMA_List_Database::_checkAccess()
|
||||
// has made a PMA_DBI_select_db() on the last one
|
||||
PMA_DBI_select_db($GLOBALS['db']);
|
||||
$foreign = PMA_getForeigners($GLOBALS['db'], $GLOBALS['table']);
|
||||
|
||||
|
Reference in New Issue
Block a user