diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-03 12:04:49 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-03 12:04:49 +0000 |
commit | df7bcec717ad586b35b42dc850775e097ce384cc (patch) | |
tree | eec636dda53eca39d99d21ffc196016ca2026d4a /includes/database/database.inc | |
parent | c17a5e70bca3113bc7e9dbb42c01e9abe47aa063 (diff) | |
download | brdo-df7bcec717ad586b35b42dc850775e097ce384cc.tar.gz brdo-df7bcec717ad586b35b42dc850775e097ce384cc.tar.bz2 |
#302395 by chx: Minor DBTNG clean-up.
Diffstat (limited to 'includes/database/database.inc')
-rw-r--r-- | includes/database/database.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc index ea95fc331..2dafd3d2e 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -250,7 +250,7 @@ abstract class DatabaseConnection extends PDO { /** * Prepare a query string and return the prepared statement. - * + * * This method statically caches prepared statements, reusing them when * possible. It also prefixes tables names enclosed in curly-braces. * @@ -712,7 +712,7 @@ abstract class Database { * TRUE if there is at least one database connection established, FALSE otherwise. */ final public static function isActiveConnection() { - return !empty(self::$connections); + return !empty(self::$activeKey) && !empty(self::$connections) && !empty(self::$connections[self::$activeKey]); } /** @@ -1356,7 +1356,7 @@ function db_escape_table($table) { * query: the SQL query executed, passed through check_plain() */ function update_sql($sql) { - $result = Database::getActiveConnection()->query($sql/*, array(true)*/); + $result = Database::getActiveConnection()->query($sql); return array('success' => $result !== FALSE, 'query' => check_plain($sql)); } |