Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
39966f5b
Commit
39966f5b
authored
Oct 28, 2008
by
anarcat
Committed by
anarcat
Oct 28, 2008
Browse files
rewrite provision_drupal_find_sites() to avoid recursing into the
sites directory, but just find the directories below Closes:
#327205
parent
7bd186f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
platform/provision_drupal.module
View file @
39966f5b
...
...
@@ -406,11 +406,16 @@ function provision_drupal_provision_delete($url, $data) {
}
function
provision_drupal_find_sites
()
{
$sitephp
=
file_scan_directory
(
'./sites'
,
'settings\.php$'
,
array
(
'.'
,
'..'
,
'CVS'
,
'.svn'
),
0
,
TRUE
,
'filename'
,
0
);
foreach
(
$sitephp
as
$file
=>
$info
)
{
$path
=
explode
(
"/"
,
$file
);
array_pop
(
$path
);
$sites
[
array_pop
(
$path
)]
=
$file
;
if
(
$dir
=
opendir
(
"./sites"
))
{
while
(
FALSE
!==
(
$subdir
=
readdir
(
$dir
)))
{
$file
=
"./sites/
$subdir
/settings.php"
;
if
(
file_exists
(
"
$file
"
))
{
$sites
[
$subdir
]
=
$file
;
}
}
}
else
{
provision_log
(
"error"
,
t
(
"Cannot find sites directory"
));
$sites
=
FALSE
;
}
return
$sites
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment