Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Commits
30eee089
Commit
30eee089
authored
12 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1766186
by beejeebus: Move test prefix munging earlier in the bootstrap.
parent
a5d98722
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/includes/bootstrap.inc
+19
-10
19 additions, 10 deletions
core/includes/bootstrap.inc
with
19 additions
and
10 deletions
core/includes/bootstrap.inc
+
19
−
10
View file @
30eee089
...
...
@@ -2245,6 +2245,9 @@ function _drupal_bootstrap_configuration() {
// Initialize the configuration, including variables from settings.php.
drupal_settings_initialize
();
// Make sure we are using the test database prefix in child Drupal sites.
_drupal_initialize_db_test_prefix
();
// Activate the class loader.
drupal_classloader
();
...
...
@@ -2310,17 +2313,9 @@ function _drupal_bootstrap_page_cache() {
}
/**
* In
itializes the database system and registers autoload function
s.
* In
a test environment, get the test db prefix and set it in $database
s.
*/
function
_drupal_bootstrap_database
()
{
// Redirect the user to the installation script if Drupal has not been
// installed yet (i.e., if no $databases array has been defined in the
// settings.php file) and we are not already installing.
if
(
empty
(
$GLOBALS
[
'databases'
])
&&
!
drupal_installation_attempted
())
{
include_once
DRUPAL_ROOT
.
'/core/includes/install.inc'
;
install_goto
(
'core/install.php'
);
}
function
_drupal_initialize_db_test_prefix
()
{
// The user agent header is used to pass a database prefix in the request when
// running tests. However, for security reasons, it is imperative that we
// validate we ourselves made the request.
...
...
@@ -2348,6 +2343,20 @@ function _drupal_bootstrap_database() {
);
}
}
}
/**
* Initializes the database system by loading database.inc.
*/
function
_drupal_bootstrap_database
()
{
// Redirect the user to the installation script if Drupal has not been
// installed yet (i.e., if no $databases array has been defined in the
// settings.php file) and we are not already installing.
if
(
empty
(
$GLOBALS
[
'databases'
])
&&
!
drupal_installation_attempted
())
{
include_once
DRUPAL_ROOT
.
'/core/includes/install.inc'
;
install_goto
(
'core/install.php'
);
}
// Initialize the database system. Note that the connection
// won't be initialized until it is actually requested.
...
...
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