diff options
author | David Rothstein <drothstein@gmail.com> | 2015-03-30 00:29:14 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2015-03-30 00:29:14 -0400 |
commit | ea48131869663312ab598d281197bc96bc8c1ac7 (patch) | |
tree | 4d8735caed7a1a87cbb9acff38c6029aef83037d /includes/bootstrap.inc | |
parent | 9dafd622f00485a1889bfd22bcf1291e2aed647b (diff) | |
download | brdo-ea48131869663312ab598d281197bc96bc8c1ac7.tar.gz brdo-ea48131869663312ab598d281197bc96bc8c1ac7.tar.bz2 |
Issue #2170453 by Darren Oh, mikeryan, Fabianx: Ignore case in code registry lookups
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 11 |
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. |