Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
294
Merge Requests
294
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
dba61c45
Commit
dba61c45
authored
Jan 28, 2010
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#599122
follow-up by scor and catch: Do not use module_load_include() in global context.
parent
f58a4c72
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
includes/module.inc
includes/module.inc
+3
-1
modules/field/field.module
modules/field/field.module
+6
-6
modules/field/tests/field_test.module
modules/field/tests/field_test.module
+3
-3
modules/file/file.module
modules/file/file.module
+3
-3
No files found.
includes/module.inc
View file @
dba61c45
...
...
@@ -245,7 +245,9 @@ function module_load_install($module) {
* module_load_include('inc', 'node', 'content_types');
* @endcode
*
* Do not use this function to load an install file. Use module_load_install()
* Do not use this function to load an install file, use module_load_install()
* instead. Do not use this function in a global context since it requires
* Drupal to be fully bootstrapped, use require_once DRUPAL_ROOT . '/path/file'
* instead.
*
* @param $type
...
...
modules/field/field.module
View file @
dba61c45
...
...
@@ -10,12 +10,12 @@
* mechanism for auto-loading core APIs, so we have to load them on
* every page request.
*/
module_load_include
(
'inc'
,
'field'
,
'field.crud'
)
;
module_load_include
(
'inc'
,
'field'
,
'field.default'
)
;
module_load_include
(
'inc'
,
'field'
,
'field.info'
)
;
module_load_include
(
'inc'
,
'field'
,
'field.multilingual'
)
;
module_load_include
(
'inc'
,
'field'
,
'field.attach'
)
;
module_load_include
(
'inc'
,
'field'
,
'field.form'
)
;
require_once
DRUPAL_ROOT
.
'/modules/field/field.crud.inc'
;
require_once
DRUPAL_ROOT
.
'/modules/field/field.default.inc'
;
require_once
DRUPAL_ROOT
.
'/modules/field/field.info.inc'
;
require_once
DRUPAL_ROOT
.
'/modules/field/field.multilingual.inc'
;
require_once
DRUPAL_ROOT
.
'/modules/field/field.attach.inc'
;
require_once
DRUPAL_ROOT
.
'/modules/field/field.form.inc'
;
/**
* @defgroup field Field API
...
...
modules/field/tests/field_test.module
View file @
dba61c45
...
...
@@ -14,9 +14,9 @@
* test helper functions
*/
module_load_include
(
'inc'
,
'field_test'
,
'field_test.entity'
)
;
module_load_include
(
'inc'
,
'field_test'
,
'field_test.field'
)
;
module_load_include
(
'inc'
,
'field_test'
,
'field_test.storage'
)
;
require_once
DRUPAL_ROOT
.
'/modules/field/tests/field_test.entity.inc'
;
require_once
DRUPAL_ROOT
.
'/modules/field/tests/field_test.field.inc'
;
require_once
DRUPAL_ROOT
.
'/modules/field/tests/field_test.storage.inc'
;
/**
* Implements hook_permission().
...
...
modules/file/file.module
View file @
dba61c45
...
...
@@ -6,6 +6,9 @@
* Defines a "managed_file" Form API field and a "file" field for Field module.
*/
// Load all Field module hooks for File.
require_once
DRUPAL_ROOT
.
'/modules/file/file.field.inc'
;
/**
* Implements hook_help().
*/
...
...
@@ -28,9 +31,6 @@ function file_help($path, $arg) {
}
}
// Load all Field module hooks for File.
module_load_include
(
'inc'
,
'file'
,
'file.field'
);
/**
* Implements hook_menu().
*/
...
...
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