Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
f98273f9
Commit
f98273f9
authored
13 years ago
by
Dries Buytaert
Committed by
Dries Buytaert
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#1081266
by mfb: avoid re-scanning module directory when multiple modules are missing.
parent
fb97b53f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/bootstrap.inc
+14
-11
14 additions, 11 deletions
includes/bootstrap.inc
with
14 additions
and
11 deletions
includes/bootstrap.inc
+
14
−
11
View file @
f98273f9
...
@@ -850,7 +850,7 @@ function drupal_settings_initialize() {
...
@@ -850,7 +850,7 @@ function drupal_settings_initialize() {
function
drupal_get_filename
(
$type
,
$name
,
$filename
=
NULL
)
{
function
drupal_get_filename
(
$type
,
$name
,
$filename
=
NULL
)
{
// The location of files will not change during the request, so do not use
// The location of files will not change during the request, so do not use
// drupal_static().
// drupal_static().
static
$files
=
array
();
static
$files
=
array
(),
$dirs
=
array
();
if
(
!
isset
(
$files
[
$type
]))
{
if
(
!
isset
(
$files
[
$type
]))
{
$files
[
$type
]
=
array
();
$files
[
$type
]
=
array
();
...
@@ -896,16 +896,19 @@ function drupal_get_filename($type, $name, $filename = NULL) {
...
@@ -896,16 +896,19 @@ function drupal_get_filename($type, $name, $filename = NULL) {
$extension
=
$type
;
$extension
=
$type
;
}
}
if
(
!
function_exists
(
'drupal_system_listing'
))
{
if
(
!
isset
(
$dirs
[
$dir
][
$extension
]))
{
require_once
DRUPAL_ROOT
.
'/includes/common.inc'
;
$dirs
[
$dir
][
$extension
]
=
TRUE
;
}
if
(
!
function_exists
(
'drupal_system_listing'
))
{
// Scan the appropriate directories for all files with the requested
require_once
DRUPAL_ROOT
.
'/includes/common.inc'
;
// extension, not just the file we are currently looking for. This
}
// prevents unnecessary scans from being repeated when this function is
// Scan the appropriate directories for all files with the requested
// called more than once in the same page request.
// extension, not just the file we are currently looking for. This
$matches
=
drupal_system_listing
(
"/^"
.
DRUPAL_PHP_FUNCTION_PATTERN
.
"\.
$extension
$/"
,
$dir
,
'name'
,
0
);
// prevents unnecessary scans from being repeated when this function is
foreach
(
$matches
as
$matched_name
=>
$file
)
{
// called more than once in the same page request.
$files
[
$type
][
$matched_name
]
=
$file
->
uri
;
$matches
=
drupal_system_listing
(
"/^"
.
DRUPAL_PHP_FUNCTION_PATTERN
.
"\.
$extension
$/"
,
$dir
,
'name'
,
0
);
foreach
(
$matches
as
$matched_name
=>
$file
)
{
$files
[
$type
][
$matched_name
]
=
$file
->
uri
;
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment