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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
5baf8db0
Commit
5baf8db0
authored
Sep 23, 2014
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2342925
by tim.plunkett: Simplify url() in order for the installer to function without it.
parent
9b16aeb5
No related branches found
No related tags found
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
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/includes/common.inc
+1
-15
1 addition, 15 deletions
core/includes/common.inc
core/includes/install.core.inc
+3
-0
3 additions, 0 deletions
core/includes/install.core.inc
core/lib/Drupal/Core/Routing/NullGenerator.php
+10
-0
10 additions, 0 deletions
core/lib/Drupal/Core/Routing/NullGenerator.php
with
14 additions
and
15 deletions
core/includes/common.inc
+
1
−
15
View file @
5baf8db0
...
...
@@ -642,21 +642,7 @@ function _format_date_callback(array $matches = NULL, $new_langcode = NULL) {
* @see \Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath().
*/
function
url
(
$path
=
NULL
,
array
$options
=
array
())
{
$generator
=
\Drupal
::
urlGenerator
();
try
{
$url
=
$generator
->
generateFromPath
(
$path
,
$options
);
}
catch
(
GeneratorNotInitializedException
$e
)
{
// Fallback to using globals.
// @todo Remove this once there is no code that calls url() when there is
// no request.
global
$base_url
,
$base_path
,
$script_path
;
$generator
->
setBasePath
(
$base_path
);
$generator
->
setBaseUrl
(
$base_url
.
'/'
);
$generator
->
setScriptPath
(
$script_path
);
$url
=
$generator
->
generateFromPath
(
$path
,
$options
);
}
return
$url
;
return
\Drupal
::
urlGenerator
()
->
generateFromPath
(
$path
,
$options
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
core/includes/install.core.inc
+
3
−
0
View file @
5baf8db0
...
...
@@ -886,6 +886,9 @@ function install_display_output($output, $install_state) {
// reached in case of an early installer error.
drupal_maintenance_theme
();
// Ensure the URL generator is initialized.
\Drupal
::
urlGenerator
()
->
updateFromRequest
();
drupal_page_header
();
// Prevent install.php from being indexed when installed in a sub folder.
...
...
This diff is collapsed.
Click to expand it.
core/lib/Drupal/Core/Routing/NullGenerator.php
+
10
−
0
View file @
5baf8db0
...
...
@@ -22,6 +22,16 @@ class NullGenerator extends UrlGenerator {
public
function
__construct
()
{
}
/**
* {@inheritdoc}
*/
public
function
updateFromRequest
()
{
global
$base_url
,
$base_path
,
$script_path
;
$this
->
basePath
=
$base_path
;
$this
->
baseUrl
=
$base_url
.
'/'
;
$this
->
scriptPath
=
$script_path
;
}
/**
* {@inheritdoc}
*
...
...
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