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_Mysqli_Driver.php | 86 --------------------------- 1 file changed, 86 deletions(-) delete mode 100644 installer/libraries/Install_Mysqli_Driver.php (limited to 'installer/libraries/Install_Mysqli_Driver.php') diff --git a/installer/libraries/Install_Mysqli_Driver.php b/installer/libraries/Install_Mysqli_Driver.php deleted file mode 100644 index 9eaaf1fc..00000000 --- a/installer/libraries/Install_Mysqli_Driver.php +++ /dev/null @@ -1,86 +0,0 @@ -_mysqli = @mysqli_connect($server, $user, $password); - if (!$this->_mysqli) { - throw new Exception(mysqli_connect_error()); - } - $this->_server = $server; - $this->_user = $user; - } - - public function __destruct() { - if (!empty($this->_mysqli)) { - @$this->_mysqli->close(); - $this->_mysqli = null; - } - } - - public function list_dbs() { - $db_list = $this->_mysqli->query("SHOW DATABASES"); - $databases = array(); - if ($db_list) { - while ($row = $db_list->fetch_row()) { - $databases[$row[0]] = 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';"; - print $select; - $privileges = $this->_mysqli->query($select); - $permissions = array(); - if ($privileges) { - while ($row = $privileges->fetch_row()) { - $permissions[strtolower($row[0])] = 1; - } - } - return $permissions; - } - - public function select_db($dbname) { - $this->_mysqli->select_db($dbname); - } - - public function list_tables($dbname) { - $select = "SHOW TABLES FROM $dbname;"; - $db_tables = $this->_mysqli->query($select); - $tables = array(); - if ($db_tables) { - while ($row = $db_tables->fetch_row()) { - $tables[strtolower($row[0])] = 1; - } - } - return $tables; - } -} - -- cgit v1.2.3