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
37422573
Commit
37422573
authored
Sep 21, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2053489
followup by tim.plunkett, klausi: Standardize on \Drupal throughout core.
parent
4351d67f
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
32 additions
and
32 deletions
+32
-32
core/includes/install.core.inc
core/includes/install.core.inc
+3
-3
core/includes/menu.inc
core/includes/menu.inc
+3
-3
core/includes/theme.inc
core/includes/theme.inc
+1
-1
core/includes/update.inc
core/includes/update.inc
+3
-3
core/modules/block/block.install
core/modules/block/block.install
+1
-1
core/modules/entity/entity.module
core/modules/entity/entity.module
+1
-1
core/modules/forum/forum.module
core/modules/forum/forum.module
+1
-1
core/modules/menu/menu.install
core/modules/menu/menu.install
+2
-2
core/modules/menu/menu.module
core/modules/menu/menu.module
+1
-1
core/modules/node/node.install
core/modules/node/node.install
+1
-1
core/modules/statistics/statistics.module
core/modules/statistics/statistics.module
+1
-1
core/modules/system/system.install
core/modules/system/system.install
+4
-4
core/modules/system/tests/modules/system_test/system_test.module
...dules/system/tests/modules/system_test/system_test.module
+2
-2
core/modules/toolbar/toolbar.install
core/modules/toolbar/toolbar.install
+1
-1
core/modules/user/user.install
core/modules/user/user.install
+1
-1
core/scripts/dump-database-d6.sh
core/scripts/dump-database-d6.sh
+1
-1
core/scripts/dump-database-d7.sh
core/scripts/dump-database-d7.sh
+1
-1
core/themes/bartik/bartik.theme
core/themes/bartik/bartik.theme
+2
-2
core/themes/seven/seven.theme
core/themes/seven/seven.theme
+2
-2
No files found.
core/includes/install.core.inc
View file @
37422573
...
...
@@ -995,7 +995,7 @@ function install_base_system(&$install_state) {
// Enable the user module so that sessions can be recorded during the
// upcoming bootstrap step.
Drupal
::
moduleHandler
()
->
install
(
array
(
'user'
),
FALSE
);
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'user'
),
FALSE
);
// Save the list of other modules to install for the upcoming tasks.
// variable_set() can be used now that system.module is installed.
...
...
@@ -2037,7 +2037,7 @@ function _install_module_batch($module, $module_name, &$context) {
// loaded by drupal_bootstrap in subsequent batch requests, and other
// modules possibly depending on it can safely perform their installation
// steps.
Drupal
::
moduleHandler
()
->
install
(
array
(
$module
),
FALSE
);
\
Drupal
::
moduleHandler
()
->
install
(
array
(
$module
),
FALSE
);
$context
[
'results'
][]
=
$module
;
$context
[
'message'
]
=
t
(
'Installed %module module.'
,
array
(
'%module'
=>
$module_name
));
}
...
...
@@ -2529,7 +2529,7 @@ function install_configure_form_submit($form, &$form_state) {
// Enable update.module if this option was selected.
if
(
$form_state
[
'values'
][
'update_status_module'
][
1
])
{
Drupal
::
moduleHandler
()
->
install
(
array
(
'file'
,
'update'
),
FALSE
);
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'file'
,
'update'
),
FALSE
);
// Add the site maintenance account's email address to the list of
// addresses to be notified when updates are available, if selected.
...
...
core/includes/menu.inc
View file @
37422573
...
...
@@ -1743,7 +1743,7 @@ function theme_menu_local_task($variables) {
$a_tag
=
l
(
$link_text
,
$link
[
'href'
],
$link
[
'localized_options'
]);
}
else
{
$a_tag
=
Drupal
::
l
(
$link_text
,
$link
[
'route_name'
],
$link
[
'route_parameters'
],
$link
[
'localized_options'
]);
$a_tag
=
\
Drupal
::
l
(
$link_text
,
$link
[
'route_name'
],
$link
[
'route_parameters'
],
$link
[
'localized_options'
]);
}
return
'<li'
.
(
!
empty
(
$variables
[
'element'
][
'#active'
])
?
' class="active"'
:
''
)
.
'>'
.
$a_tag
.
'</li>'
;
...
...
@@ -1967,9 +1967,9 @@ function menu_local_tasks($level = 0) {
$data
[
'tabs'
]
=
array
();
$data
[
'actions'
]
=
array
();
$route_name
=
Drupal
::
request
()
->
attributes
->
get
(
RouteObjectInterface
::
ROUTE_NAME
);
$route_name
=
\
Drupal
::
request
()
->
attributes
->
get
(
RouteObjectInterface
::
ROUTE_NAME
);
if
(
!
empty
(
$route_name
))
{
$manager
=
Drupal
::
service
(
'plugin.manager.menu.local_task'
);
$manager
=
\
Drupal
::
service
(
'plugin.manager.menu.local_task'
);
$local_tasks
=
$manager
->
getTasksBuild
(
$route_name
);
foreach
(
$local_tasks
as
$level
=>
$items
)
{
$data
[
'tabs'
][
$level
]
=
empty
(
$data
[
'tabs'
][
$level
])
?
$items
:
array_merge
(
$data
[
'tabs'
][
$level
],
$items
);
...
...
core/includes/theme.inc
View file @
37422573
...
...
@@ -77,7 +77,7 @@ function drupal_theme_access($theme) {
if
(
is_object
(
$theme
))
{
$theme
=
$theme
->
name
;
}
return
Drupal
::
service
(
'access_check.theme'
)
->
checkAccess
(
$theme
);
return
\
Drupal
::
service
(
'access_check.theme'
)
->
checkAccess
(
$theme
);
}
/**
...
...
core/includes/update.inc
View file @
37422573
...
...
@@ -485,7 +485,7 @@ function update_prepare_stored_includes() {
*/
function
update_prepare_d8_language
()
{
if
(
db_table_exists
(
'languages'
))
{
Drupal
::
moduleHandler
()
->
install
(
array
(
'language'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'language'
));
$languages
=
db_select
(
'languages'
,
'l'
)
->
fields
(
'l'
)
...
...
@@ -677,7 +677,7 @@ function update_fix_d8_requirements() {
// Make sure that file.module is enabled as it is required for the user
// picture upgrade path.
Drupal
::
moduleHandler
()
->
install
(
array
(
'file'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'file'
));
$schema
=
array
(
'description'
=>
'Generic key/value storage table with an expiration.'
,
...
...
@@ -721,7 +721,7 @@ function update_fix_d8_requirements() {
// views configurations.
// Like any other module APIs and services, Views' services are not available
// in update.php. Existing listings are migrated into configuration, using
// the limited standard tools of raw database queries and Drupal::config().
// the limited standard tools of raw database queries and
\
Drupal::config().
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'views'
));
update_variable_set
(
'update_d8_requirements'
,
TRUE
);
...
...
core/modules/block/block.install
View file @
37422573
...
...
@@ -184,7 +184,7 @@ function block_update_8005() {
* Enable the Custom Block module.
*/
function
block_update_8006
()
{
Drupal
::
moduleHandler
()
->
install
(
array
(
'custom_block'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'custom_block'
));
}
/**
...
...
core/modules/entity/entity.module
View file @
37422573
...
...
@@ -163,7 +163,7 @@ function entity_entity_bundle_delete($entity_type, $bundle) {
function
entity_module_preuninstall
(
$module
)
{
// Clean up all entity bundles (including field instances) of every entity
// type provided by the module that is being uninstalled.
foreach
(
Drupal
::
entityManager
()
->
getDefinitions
()
as
$entity_type
=>
$entity_info
)
{
foreach
(
\
Drupal
::
entityManager
()
->
getDefinitions
()
as
$entity_type
=>
$entity_info
)
{
if
(
$entity_info
[
'module'
]
==
$module
)
{
foreach
(
array_keys
(
entity_get_bundles
(
$entity_type
))
as
$bundle
)
{
entity_invoke_bundle_hook
(
'delete'
,
$entity_type
,
$bundle
);
...
...
core/modules/forum/forum.module
View file @
37422573
...
...
@@ -548,7 +548,7 @@ function forum_form_node_form_alter(&$form, &$form_state, $form_id) {
// If there is no default forum already selected, try to get the forum
// ID from the URL (e.g., if we are on a page like node/add/forum/2, we
// expect "2" to be the ID of the forum that was requested).
$requested_forum_id
=
Drupal
::
request
()
->
query
->
get
(
'forum_id'
);
$requested_forum_id
=
\
Drupal
::
request
()
->
query
->
get
(
'forum_id'
);
$widget
[
'#default_value'
]
=
is_numeric
(
$requested_forum_id
)
?
$requested_forum_id
:
''
;
}
}
...
...
core/modules/menu/menu.install
View file @
37422573
...
...
@@ -12,7 +12,7 @@
*/
function
menu_install
()
{
// Add a link for each custom menu.
Drupal
::
service
(
'router.builder'
)
->
rebuild
();
\
Drupal
::
service
(
'router.builder'
)
->
rebuild
();
menu_router_rebuild
();
$system_link
=
entity_load_multiple_by_properties
(
'menu_link'
,
array
(
'link_path'
=>
'admin/structure/menu'
,
'module'
=>
'system'
));
$system_link
=
reset
(
$system_link
);
...
...
@@ -30,7 +30,7 @@ function menu_install() {
$link
->
link_title
=
$menu
->
label
();
$link
->
link_path
=
'admin/structure/menu/manage/'
.
$menu
->
id
();
$query
=
Drupal
::
entityQuery
(
'menu_link'
)
$query
=
\
Drupal
::
entityQuery
(
'menu_link'
)
->
condition
(
'link_path'
,
$link
->
link_path
)
->
condition
(
'plid'
,
$link
->
plid
);
$result
=
$query
->
execute
();
...
...
core/modules/menu/menu.module
View file @
37422573
...
...
@@ -499,7 +499,7 @@ function menu_form_node_form_alter(&$form, $form_state) {
$form
[
'menu'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
t
(
'Menu settings'
),
'#access'
=>
Drupal
::
currentUser
()
->
hasPermission
(
'administer menu'
),
'#access'
=>
\
Drupal
::
currentUser
()
->
hasPermission
(
'administer menu'
),
'#collapsed'
=>
!
$link
[
'link_title'
],
'#group'
=>
'advanced'
,
'#attached'
=>
array
(
...
...
core/modules/node/node.install
View file @
37422573
...
...
@@ -696,7 +696,7 @@ function node_update_8011() {
*/
function
node_update_8012
()
{
// Enable the history module without re-installing the schema.
Drupal
::
moduleHandler
()
->
install
(
array
(
'history'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'history'
));
}
/**
...
...
core/modules/statistics/statistics.module
View file @
37422573
...
...
@@ -58,7 +58,7 @@ function statistics_node_view(EntityInterface $node, EntityDisplay $display, $vi
}
if
(
$view_mode
!=
'rss'
)
{
if
(
Drupal
::
currentUser
()
->
hasPermission
(
'view post access counter'
))
{
if
(
\
Drupal
::
currentUser
()
->
hasPermission
(
'view post access counter'
))
{
$statistics
=
statistics_get
(
$node
->
id
());
if
(
$statistics
)
{
$links
[
'statistics_counter'
][
'title'
]
=
format_plural
(
$statistics
[
'totalcount'
],
'1 view'
,
'@count views'
);
...
...
core/modules/system/system.install
View file @
37422573
...
...
@@ -1550,7 +1550,7 @@ function system_update_8020() {
->
condition
(
'aid'
,
'system_block_ip_action'
)
->
execute
();
// Enable the new Ban module.
Drupal
::
moduleHandler
()
->
install
(
array
(
'ban'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'ban'
));
}
else
{
// Drop old table.
...
...
@@ -1563,7 +1563,7 @@ function system_update_8020() {
*/
function
system_update_8021
()
{
// Enable the module without re-installing the schema.
Drupal
::
moduleHandler
()
->
install
(
array
(
'action'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'action'
));
// Rename former System module actions.
$map
=
array
(
'system_message_action'
=>
'action_message_action'
,
...
...
@@ -1864,7 +1864,7 @@ function system_update_8041() {
* Enable the new Entity module.
*/
function
system_update_8042
()
{
Drupal
::
moduleHandler
()
->
install
(
array
(
'entity'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'entity'
));
}
/**
...
...
@@ -1978,7 +1978,7 @@ function system_update_8047() {
*/
function
system_update_8048
()
{
// Enable the module without re-installing the schema.
Drupal
::
moduleHandler
()
->
install
(
array
(
'menu_link'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'menu_link'
));
// Add the langcode column if it doesn't exist.
if
(
!
db_field_exists
(
'menu_inks'
,
'langcode'
))
{
...
...
core/modules/system/tests/modules/system_test/system_test.module
View file @
37422573
...
...
@@ -263,12 +263,12 @@ function system_test_authorize_init_page($page_title) {
* Implements hook_module_preinstall().
*/
function
system_test_module_preinstall
(
$module
)
{
Drupal
::
state
()
->
set
(
'system_test_preinstall_module'
,
$module
);
\
Drupal
::
state
()
->
set
(
'system_test_preinstall_module'
,
$module
);
}
/**
* Implements hook_module_preuninstall().
*/
function
system_test_module_preuninstall
(
$module
)
{
Drupal
::
state
()
->
set
(
'system_test_preuninstall_module'
,
$module
);
\
Drupal
::
state
()
->
set
(
'system_test_preuninstall_module'
,
$module
);
}
core/modules/toolbar/toolbar.install
View file @
37422573
...
...
@@ -18,7 +18,7 @@
*/
function
toolbar_update_8000
()
{
// Enable the modules without re-installing the schema.
Drupal
::
moduleHandler
()
->
install
(
array
(
'breakpoint'
));
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'breakpoint'
));
}
/**
...
...
core/modules/user/user.install
View file @
37422573
...
...
@@ -614,7 +614,7 @@ function user_update_8011() {
// User pictures can only be migrated to the new user picture image field
// if Image module is installed.
if
(
!
module_exists
(
'image'
))
{
$old_schema
=
Drupal
::
moduleHandler
()
->
install
(
array
(
'image'
));
$old_schema
=
\
Drupal
::
moduleHandler
()
->
install
(
array
(
'image'
));
if
(
$old_schema
[
'image'
]
==
SCHEMA_UNINSTALLED
)
{
// Install image.module with schema version 8002 as a previous version
// would have to create tables that would be removed again.
...
...
core/scripts/dump-database-d6.sh
View file @
37422573
...
...
@@ -44,7 +44,7 @@
ENDOFHEADER
;
foreach
(
Drupal::moduleHandler
()
->getModuleList
()
as
$module
=>
$filename
)
{
foreach
(
\
D
rupal::moduleHandler
()
->getModuleList
()
as
$module
=>
$filename
)
{
$output
.
=
" * -
$module
\n
"
;
}
$output
.
=
" */
\n\n
"
;
...
...
core/scripts/dump-database-d7.sh
View file @
37422573
...
...
@@ -45,7 +45,7 @@
ENDOFHEADER
;
foreach
(
Drupal::moduleHandler
()
->getModuleList
()
as
$module
=>
$filename
)
{
foreach
(
\
D
rupal::moduleHandler
()
->getModuleList
()
as
$module
=>
$filename
)
{
$output
.
=
" * -
$module
\n
"
;
}
$output
.
=
" */
\n\n
"
;
...
...
core/themes/bartik/bartik.theme
View file @
37422573
...
...
@@ -43,7 +43,7 @@ function bartik_preprocess_page(&$variables) {
$variables
[
'secondary_menu'
][
'#attributes'
][
'class'
]
=
array
(
'links'
,
'inline'
,
'clearfix'
);
}
$site_config
=
Drupal
::
config
(
'system.site'
);
$site_config
=
\
Drupal
::
config
(
'system.site'
);
// Always print the site name and slogan, but if they are toggled off, we'll
// just hide them visually.
$variables
[
'hide_site_name'
]
=
theme_get_setting
(
'features.name'
)
?
FALSE
:
TRUE
;
...
...
@@ -87,7 +87,7 @@ function bartik_preprocess_maintenance_page(&$variables) {
drupal_add_css
(
drupal_get_path
(
'theme'
,
'bartik'
)
.
'/css/maintenance-page.css'
);
$variables
[
'styles'
]
=
drupal_get_css
();
$site_config
=
Drupal
::
config
(
'system.site'
);
$site_config
=
\
Drupal
::
config
(
'system.site'
);
// Always print the site name and slogan, but if they are toggled off, we'll
// just hide them visually.
$variables
[
'hide_site_name'
]
=
theme_get_setting
(
'features.name'
)
?
FALSE
:
TRUE
;
...
...
core/themes/seven/seven.theme
View file @
37422573
...
...
@@ -14,7 +14,7 @@ function seven_library_info() {
$path
=
drupal_get_path
(
'theme'
,
'seven'
);
$libraries
[
'install-page'
]
=
array
(
'version'
=>
Drupal
::
VERSION
,
'version'
=>
\
Drupal
::
VERSION
,
'js'
=>
array
(
$path
.
'/js/mobile.install.js'
=>
array
(
'group'
=>
JS_THEME
,
...
...
@@ -99,7 +99,7 @@ function seven_custom_block_add_list($variables) {
$content
.
=
'<div class="description">'
.
filter_xss_admin
(
$type
[
'description'
])
.
'</div>'
;
$options
=
$type
[
'localized_options'
];
$options
[
'html'
]
=
TRUE
;
$output
.
=
Drupal
::
l
(
$content
,
'custom_block.add_form'
,
array
(
'custom_block_type'
=>
$id
),
$options
);
$output
.
=
\
Drupal
::
l
(
$content
,
'custom_block.add_form'
,
array
(
'custom_block_type'
=>
$id
),
$options
);
$output
.
=
'</li>'
;
}
$output
.
=
'</ul>'
;
...
...
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