summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-30 00:29:14 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-30 00:29:14 -0400
commitea48131869663312ab598d281197bc96bc8c1ac7 (patch)
tree4d8735caed7a1a87cbb9acff38c6029aef83037d /includes
parent9dafd622f00485a1889bfd22bcf1291e2aed647b (diff)
downloadbrdo-ea48131869663312ab598d281197bc96bc8c1ac7.tar.gz
brdo-ea48131869663312ab598d281197bc96bc8c1ac7.tar.bz2
Issue #2170453 by Darren Oh, mikeryan, Fabianx: Ignore case in code registry lookups
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 922fd094e..6a0ff7bc9 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -3167,10 +3167,13 @@ function _registry_check_code($type, $name = NULL) {
// This function may get called when the default database is not active, but
// there is no reason we'd ever want to not use the default database for
// this query.
- $file = Database::getConnection('default', 'default')->query("SELECT filename FROM {registry} WHERE name = :name AND type = :type", array(
- ':name' => $name,
- ':type' => $type,
- ))
+ $file = Database::getConnection('default', 'default')
+ ->select('registry', 'r', array('target' => 'default'))
+ ->fields('r', array('filename'))
+ // Use LIKE here to make the query case-insensitive.
+ ->condition('r.name', db_like($name), 'LIKE')
+ ->condition('r.type', $type)
+ ->execute()
->fetchField();
// Flag that we've run a lookup query and need to update the cache.