Commit 1e6718ee authored by anarcat's avatar anarcat Committed by anarcat

do not consider sites/./settings.php and sites/../settings.php as

valid drupal sites

Closes: #441810
parent 1abb0965
......@@ -317,9 +317,12 @@ function _provision_find_profiles() {
function provision_drupal_find_sites() {
if ($dir = opendir("./sites")) {
while (FALSE !== ($subdir = readdir($dir))) {
$file = "./sites/$subdir/settings.php";
if (file_exists("$file") && ($subdir != 'default') && !is_link("./sites/$subdir")) {
$sites[$subdir] = $file;
// skip internal directory pointers
if ($subdir == '.' || $subdir == '..') {
$file = "./sites/$subdir/settings.php";
if (file_exists("$file") && ($subdir != 'default') && !is_link("./sites/$subdir")) {
$sites[$subdir] = $file;
}
}
}
closedir($dir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment