diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-12-29 19:56:25 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-12-29 19:56:25 +0000 |
commit | bc9aeff7dda9b2b93f63fd93befd499f4732cde6 (patch) | |
tree | a97664fb119530fea7c0361cb1add618ba618a66 /includes | |
parent | 09c55017f6e1d74fbd5222df622602d14cfc7fdf (diff) | |
download | brdo-bc9aeff7dda9b2b93f63fd93befd499f4732cde6.tar.gz brdo-bc9aeff7dda9b2b93f63fd93befd499f4732cde6.tar.bz2 |
- Patch #14890: corrected the documentation of conf_init().
Diffstat (limited to 'includes')
-rw-r--r-- | includes/bootstrap.inc | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 2f57a9294..23664808e 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -14,15 +14,27 @@ define('CACHE_TEMPORARY', -1); * * Try finding a matching configuration directory by stripping the * website's hostname from left to right and pathname from right to - * left. If no configuration file is found, return a default value - * '$confdir/default'. Example for a ficticious site installed at - * http://www.drupal.org/test: + * left. The first configuration file found will be used, the + * remaining will ignored. If no configuration file is found, + * return a default value '$confdir/default'. * - * 1. www.drupal.org.test - * 2. drupal.org.test - * 3. www.drupal.org - * 4. drupal.org - * 5. default + * Example for a ficticious site installed at + * http://www.drupal.org/mysite/test/ the 'settings.php' is + * searched in the following directories: + * + * 1. $confdir/www.drupal.org.mysite.test + * 2. $confdir/drupal.org.mysite.test + * 3. $confdir/org.mysite.test + * + * 4. $confdir/www.drupal.org.mysite + * 5. $confdir/drupal.org.mysite + * 6. $confdir/org.mysite + * + * 7. $confdir/www.drupal.org + * 8. $confdir/drupal.org + * 9. $confdir/org + * + * 10. $confdir/default */ function conf_init() { static $conf = ''; @@ -31,9 +43,9 @@ function conf_init() { return $conf; } + $confdir = 'sites'; $uri = explode('/', $_SERVER['PHP_SELF']); $server = explode('.', $_SERVER['HTTP_HOST']); - $confdir = 'sites'; 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)); |