Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c0475473
Commit
c0475473
authored
Mar 16, 2013
by
webchick
Browse files
Issue
#1941288
by larowlan: Cleanup container call in drupal_get_js().
parent
4cc0db2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/includes/common.inc
View file @
c0475473
...
...
@@ -3839,12 +3839,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS
uasort
(
$items
,
'drupal_sort_css_js'
);
// Don't add settings if there is no other JavaScript on the page, unless
// this is an AJAX request.
// @todo Clean up container call.
$container
=
drupal_container
();
if
(
$container
->
has
(
'content_negotiation'
)
&&
$container
->
isScopeActive
(
'request'
))
{
$type
=
$container
->
get
(
'content_negotiation'
)
->
getContentType
(
$container
->
get
(
'request'
));
}
if
(
!
empty
(
$items
[
'settings'
])
||
(
!
empty
(
$type
)
&&
$type
==
'ajax'
))
{
if
(
!
empty
(
$items
[
'settings'
])
||
Drupal
::
service
(
'request'
)
->
isXmlHttpRequest
())
{
global
$theme_key
;
// Provide the page with information about the theme that's used, so that
// a later AJAX request can be rendered using the same theme.
...
...
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