Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
dca406aa
Commit
dca406aa
authored
Aug 11, 2012
by
Crell
Committed by
effulgentsia
Oct 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only try to rebuild the router table if the dumper is actually available.
parent
684f00dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
core/includes/common.inc
core/includes/common.inc
+9
-6
No files found.
core/includes/common.inc
View file @
dca406aa
...
...
@@ -4,6 +4,7 @@
use
Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
;
use
Symfony\Component\HttpKernel\Exception\NotFoundHttpException
;
use
Drupal\Core\Cache\CacheBackendInterface
;
use
Symfony\Component\DependencyInjection\Container
;
use
Drupal\Core\Database\Database
;
use
Drupal\Core\Template\Attribute
;
...
...
@@ -6846,13 +6847,15 @@ function router_rebuild() {
// a given item came from.
$callbacks
=
array
();
$dumper
=
drupal_container
()
->
get
(
'router.dumper'
);
$dumper
=
drupal_container
()
->
get
(
'router.dumper'
,
Container
::
NULL_ON_INVALID_REFERENCE
);
foreach
(
module_implements
(
'route_info'
)
as
$module
)
{
$routes
=
call_user_func
(
$module
.
'_route_info'
);
drupal_alter
(
'router_info'
,
$routes
);
$dumper
->
addRoutes
(
$routes
);
$dumper
->
dump
(
array
(
'route_set'
=>
$module
));
if
(
$dumper
)
{
foreach
(
module_implements
(
'route_info'
)
as
$module
)
{
$routes
=
call_user_func
(
$module
.
'_route_info'
);
drupal_alter
(
'router_info'
,
$routes
);
$dumper
->
addRoutes
(
$routes
);
$dumper
->
dump
(
array
(
'route_set'
=>
$module
));
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment