From 98ec8cd411d0a100d595d352588534b02a82d43d Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 2 Mar 2012 10:00:31 -0500 Subject: [PATCH] Various improvements --- index.php | 7 +++++++ sys/databases/mysql.php | 5 ----- sys/windows/widgets/db_info_widget.php | 14 +++++++++++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 70a01d9..969464d 100644 --- a/index.php +++ b/index.php @@ -90,6 +90,13 @@ $path = BASE_DIR . "/databases/"; foreach(pdo_drivers() as $d) { + + // Use the ibase_functions over PDO::Firebird, at least for now + if($d == 'firebird') + { + continue; + } + $file = "{$path}{$d}.php"; if(is_file($file)) diff --git a/sys/databases/mysql.php b/sys/databases/mysql.php index 099314f..ad845d0 100644 --- a/sys/databases/mysql.php +++ b/sys/databases/mysql.php @@ -29,11 +29,6 @@ class MySQL extends DB_PDO { */ public function __construct($dsn, $username=null, $password=null, $options=array()) { - $options = array_merge(array( - PDO::MYSQL_ATTR_FOUND_ROWS => true - ), - $options); - parent::__construct("mysql:$dsn", $username, $password, $options); $class = __CLASS__.'_sql'; diff --git a/sys/windows/widgets/db_info_widget.php b/sys/windows/widgets/db_info_widget.php index b17362d..94924c1 100644 --- a/sys/windows/widgets/db_info_widget.php +++ b/sys/windows/widgets/db_info_widget.php @@ -158,7 +158,7 @@ class DB_Info_Widget extends GtkTable { $new_db = $this->dbtype->get_active_text(); // Reset - $this->host->set_text('localhost'); + $this->host->set_text('127.0.0.1'); $this->db_file->set_filename(NULL); $this->port->show(); $this->lblport->show(); @@ -295,11 +295,19 @@ class DB_Info_Widget extends GtkTable { return FALSE; } + $pdo_drivers = pdo_drivers(); + // Add PDO drivers - foreach(pdo_drivers() as $d) + foreach($pdo_drivers as $d) { // Skip sqlite2 as opposed to sqlite3 - if($d === 'sqlite2') + if($d === 'sqlite2' && in_array('sqlite', $pdo_drivers)) + { + continue; + } + + // Use the ibase_functions over PDO::Firebird, at least for now + if($d === 'firebird') { continue; }