From: X! Date: Tue, 28 Dec 2010 18:30:03 +0000 (+0000) Subject: Fix r79109: listTables() does not work without a prefix, and verified that SQLite... X-Git-Tag: 1.31.0-rc.0~33027 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=198b54f45421218c6cff287820db6df1209e967f;p=lhc%2Fweb%2Fwiklou.git Fix r79109: listTables() does not work without a prefix, and verified that SQLite works now --- diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index 2eee6cf352..7ecc3de9ad 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -546,7 +546,7 @@ class DatabaseMysql extends DatabaseBase { $vars = get_object_vars($table); $table = array_pop( $vars ); - if( strpos( $table, $prefix ) === 0 || is_null( $prefix ) ) { + if( empty( $prefix ) || strpos( $table, $prefix ) === 0 ) { $endArray[] = $table; } } diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 4dc2e4d03a..242024873a 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -620,7 +620,7 @@ class DatabaseSqlite extends DatabaseBase { $result = $this->select( 'sqlite_master', 'name', - "type='TABLE'" + "type='table'" ); $endArray = array(); @@ -629,7 +629,7 @@ class DatabaseSqlite extends DatabaseBase { $vars = get_object_vars($table); $table = array_pop( $vars ); - if( strpos( $table, $prefix ) === 0 || is_null( $prefix ) ) { + if( empty( $prefix ) || strpos( $table, $prefix ) === 0 ) { $endArray[] = $table; } }