From e231a010b17e39b6f2502f51e59b332c14d5a169 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Tue, 2 Oct 2007 09:27:47 +0000 Subject: [PATCH] removed MySQL < 5 code --- libraries/List_Database.class.php | 29 ----------------------------- tbl_operations.php | 5 ----- 2 files changed, 34 deletions(-) diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php index d4eb091ff..3c850f4e6 100644 --- a/libraries/List_Database.class.php +++ b/libraries/List_Database.class.php @@ -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); } diff --git a/tbl_operations.php b/tbl_operations.php index e9dbcb98a..e31c8479f 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -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']);