summaryrefslogtreecommitdiff
path: root/includes/database
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-23 01:39:44 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-23 01:39:44 +0000
commit925722a804874eb357eec15b530a394a37092b54 (patch)
tree0c2ea435ddfbcc9891b406fa2b83c0339ca78dcf /includes/database
parenta87da0d78a67c307a54ce735aa00b0c6cb11ad69 (diff)
downloadbrdo-925722a804874eb357eec15b530a394a37092b54.tar.gz
brdo-925722a804874eb357eec15b530a394a37092b54.tar.bz2
#850852 follow-up by Damien Tournoud: Fixed notices that caused tests to fail.
Diffstat (limited to 'includes/database')
-rw-r--r--includes/database/sqlite/schema.inc13
1 files changed, 5 insertions, 8 deletions
diff --git a/includes/database/sqlite/schema.inc b/includes/database/sqlite/schema.inc
index a7871a577..b6f95e497 100644
--- a/includes/database/sqlite/schema.inc
+++ b/includes/database/sqlite/schema.inc
@@ -622,16 +622,13 @@ class DatabaseSchema_sqlite extends DatabaseSchema {
}
public function findTables($table_expression) {
- // Don't use getPrefixInfo -- $table_expression includes the prefix.
- list($prefix, $table) = explode('.', $table_expression);
- if (empty($table)) {
- $table = $prefix;
- $prefix = NULL;
- }
+ // Don't add the prefix, $table_expression already includes the prefix.
+ $info = $this->getPrefixInfo($table_expression, FALSE);
+
// Can't use query placeholders because the query would have to be
// :prefixsqlite_master, which does not work.
- $result = db_query("SELECT name FROM " . ($prefix ? $prefix . '.' : '') . "sqlite_master WHERE name LIKE :table_name", array(
- ':table_name' => $table,
+ $result = db_query("SELECT name FROM " . $info['schema'] . ".sqlite_master WHERE name LIKE :table_name", array(
+ ':table_name' => $info['table'],
));
return $result->fetchAllKeyed(0, 0);
}