Various improvements

This commit is contained in:
Timothy Warren 2012-03-02 10:00:31 -05:00
parent 32c4b78de8
commit 98ec8cd411
3 changed files with 18 additions and 8 deletions

View File

@ -90,6 +90,13 @@ $path = BASE_DIR . "/databases/";
foreach(pdo_drivers() as $d) foreach(pdo_drivers() as $d)
{ {
// Use the ibase_functions over PDO::Firebird, at least for now
if($d == 'firebird')
{
continue;
}
$file = "{$path}{$d}.php"; $file = "{$path}{$d}.php";
if(is_file($file)) if(is_file($file))

View File

@ -29,11 +29,6 @@ class MySQL extends DB_PDO {
*/ */
public function __construct($dsn, $username=null, $password=null, $options=array()) 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); parent::__construct("mysql:$dsn", $username, $password, $options);
$class = __CLASS__.'_sql'; $class = __CLASS__.'_sql';

View File

@ -158,7 +158,7 @@ class DB_Info_Widget extends GtkTable {
$new_db = $this->dbtype->get_active_text(); $new_db = $this->dbtype->get_active_text();
// Reset // Reset
$this->host->set_text('localhost'); $this->host->set_text('127.0.0.1');
$this->db_file->set_filename(NULL); $this->db_file->set_filename(NULL);
$this->port->show(); $this->port->show();
$this->lblport->show(); $this->lblport->show();
@ -295,11 +295,19 @@ class DB_Info_Widget extends GtkTable {
return FALSE; return FALSE;
} }
$pdo_drivers = pdo_drivers();
// Add PDO drivers // Add PDO drivers
foreach(pdo_drivers() as $d) foreach($pdo_drivers as $d)
{ {
// Skip sqlite2 as opposed to sqlite3 // 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; continue;
} }