Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3174996
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3174996
Commits
a6a58c16
Commit
a6a58c16
authored
16 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#319394
by Crell: force the default database for registry queries.
parent
dc423845
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/bootstrap.inc
+8
-2
8 additions, 2 deletions
includes/bootstrap.inc
with
8 additions
and
2 deletions
includes/bootstrap.inc
+
8
−
2
View file @
a6a58c16
...
...
@@ -1447,7 +1447,10 @@ function drupal_autoload_class($class) {
* Helper to check for a resource in the registry.
*/
function
_registry_check_code
(
$type
,
$name
)
{
$file
=
db_query
(
"SELECT filename FROM
{
registry
}
WHERE name = :name AND type = :type"
,
array
(
// 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'
)
->
query
(
"SELECT filename FROM
{
registry
}
WHERE name = :name AND type = :type"
,
array
(
':name'
=>
$name
,
':type'
=>
$type
,
))
...
...
@@ -1507,7 +1510,10 @@ function registry_cache_path_files() {
$type_sql
=
array
();
$params
=
array
();
$select
=
db_select
(
'registry'
)
->
distinct
();
// 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.
$select
=
Database
::
getConnection
(
'default'
)
->
select
(
'registry'
)
->
distinct
();
$select
->
addField
(
'registry'
,
'filename'
);
// This creates a series of 2-clause AND conditions that are then ORed together.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment