diff --git a/civicrm.config.php.backdrop b/civicrm.config.php.backdrop
index 00b448a..f3b7303 100644
--- a/civicrm.config.php.backdrop
+++ b/civicrm.config.php.backdrop
@@ -83,18 +83,9 @@ function civicrm_conf_init() {
}
}
- if (file_exists($confdir . DIRECTORY_SEPARATOR . 'civicrm.settings.php')) {
- return $confdir;
- }
-
- if (!file_exists($confdir) && !$skipConfigError) {
- echo "Could not find valid configuration dir, best guess: $confdir
\n";
- exit();
- }
-
// Alias could be defined in sites/sites.php
- if (file_exists($confdir . "/sites.php")) {
- include $confdir . "/sites.php";
+ if (file_exists($confdir . "/sites/sites.php")) {
+ include $confdir . "/sites/sites.php";
}
else {
$sites = array();
@@ -108,20 +99,31 @@ function civicrm_conf_init() {
for ($i = count($uri) - 1; $i > 0; $i--) {
for ($j = count($server); $j > 0; $j--) {
$dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
- if (file_exists("$confdir/$dir/civicrm.settings.php")) {
- $conf = "$confdir/$dir";
+ if (file_exists("$confdir/sites/$dir/civicrm.settings.php")) {
+ $conf = "$confdir/sites/$dir";
return $conf;
}
// check for alias
- if (isset($sites[$dir]) && file_exists("$confdir/{$sites[$dir]}/civicrm.settings.php")) {
- $conf = "$confdir/{$sites[$dir]}";
+ if (isset($sites[$dir]) && file_exists("$confdir/sites/{$sites[$dir]}/civicrm.settings.php")) {
+ $conf = "$confdir/sites/{$sites[$dir]}";
return $conf;
}
}
}
// FIXME: problem spot for Drupal 5.1 config dir layout
- $conf = "$confdir/default";
+ $conf = "$confdir/sites/default";
+
+ if (file_exists($confdir . DIRECTORY_SEPARATOR . 'civicrm.settings.php')) {
+ return $confdir;
+ }
+
+ if (!file_exists($confdir) && !$skipConfigError) {
+ echo "Could not find valid configuration dir, best guess: $confdir
\n";
+ exit();
+ }
+
+
return $conf;
}