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
1b834201
Commit
1b834201
authored
Oct 30, 2009
by
Dries
Browse files
- Patch
#615734
by catch: document why we call drupal_get_filename() in module_list().
parent
3d1058eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/module.inc
View file @
1b834201
...
...
@@ -62,6 +62,11 @@ function module_list($refresh = FALSE, $bootstrap = FALSE, $sort = FALSE, $fixed
}
foreach
(
$result
as
$module
)
{
if
(
file_exists
(
$module
->
filename
))
{
// First call drupal_get_filename() to prime the static cache for
// later lookups of the module path. Since we've already queried for
// the filename and can pass that in as an argument, this avoids a
// database hit for every module when drupal_get_filename() is
// subsequently called by drupal_load().
drupal_get_filename
(
'module'
,
$module
->
name
,
$module
->
filename
);
$list
[
$module
->
name
]
=
$module
->
name
;
}
...
...
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