From 631a7883ee355e5c01160eb5559f3912b4c604f8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 19 Jan 2009 00:14:28 +0000 Subject: Get rid of the driver libaries. Use mysql calls directly in the installer for now. If we detect mysqli, we can always use that as a driver instead, but we don't require it for the installer. --- installer/libraries/Install_Mysql_Driver.php | 79 ---------------------------- 1 file changed, 79 deletions(-) delete mode 100644 installer/libraries/Install_Mysql_Driver.php (limited to 'installer/libraries/Install_Mysql_Driver.php') diff --git a/installer/libraries/Install_Mysql_Driver.php b/installer/libraries/Install_Mysql_Driver.php deleted file mode 100644 index 6ddfd1fc..00000000 --- a/installer/libraries/Install_Mysql_Driver.php +++ /dev/null @@ -1,79 +0,0 @@ -_link = @mysql_connect($server, $user, $password); - if (!$this->_link) { - throw new Exception(mysql_error()); - } - $this->_server = $server; - $this->_user = $user; - } - - public function __destruct() { - if (!empty($this->_link)) { - @mysql_close($this->_link); - } - } - - public function list_dbs() { - $db_list = mysql_list_dbs($this->_link); - $databases = array(); - while ($row = mysql_fetch_object($db_list)) { - $databases[$row->Database] = 1; - } - return $databases; - } - - public function get_access_rights($dbname) { - $select = "SELECT PRIVILEGE_TYPE " . - " FROM `information_schema`.`schema_privileges`" . - " WHERE `GRANTEE` = '\\'{$this->_user}\\'@\\'{$this->_server}\\''" . - " AND `TABLE_SCHEMA` = '$dbname';"; - $privileges = mysql_query($select, $this->_link); - $permissions = array(); - if ($privileges) { - while ($row = mysql_fetch_assoc($privileges)) { - $permissions[strtolower($row["PRIVILEGE_TYPE"])] = 1; - } - } - return $permissions; - } - - public function select_db($dbname) { - mysql_select_db($dbname); - } - - public function list_tables($dbname) { - $select = "SHOW TABLES FROM $dbname;"; - $db_tables = mysql_query($select, $this->_link); - $tables = array(); - if ($db_tables) { - while ($row = mysql_fetch_assoc($db_tables)) { - $tables[$row["Tables_in_$dbname"]] = 1; - } - } - return $tables; - } -} -- cgit v1.2.3