Commit 7a5c5b83 authored by Dries's avatar Dries

- Patch #35725 by drumm: improved conf_init() documentation.

parent ecc279ae
......@@ -82,29 +82,31 @@ function timer_stop($name) {
/**
* Locate the appropriate configuration file.
*
* Try finding a matching configuration directory by stripping the
* website's hostname from left to right and pathname from right to
* 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'.
* Try finding a matching configuration directory by stripping the website's
* hostname from left to right and pathname from right to 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'.
*
* Example for a fictitious site installed at
* http://www.drupal.org/mysite/test/ the 'settings.php' is
* searched in the following directories:
* http://www.drupal.org:8080/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
* 1. $confdir/8080.www.drupal.org.mysite.test
* 2. $confdir/www.drupal.org.mysite.test
* 3. $confdir/drupal.org.mysite.test
* 4. $confdir/org.mysite.test
*
* 4. $confdir/www.drupal.org.mysite
* 5. $confdir/drupal.org.mysite
* 6. $confdir/org.mysite
* 5. $confdir/8080.www.drupal.org.mysite
* 6. $confdir/www.drupal.org.mysite
* 7. $confdir/drupal.org.mysite
* 8. $confdir/org.mysite
*
* 7. $confdir/www.drupal.org
* 8. $confdir/drupal.org
* 9. $confdir/org
* 9. $confdir/8080.www.drupal.org
* 10. $confdir/www.drupal.org
* 11. $confdir/drupal.org
* 12. $confdir/org
*
* 10. $confdir/default
* 13. $confdir/default
*/
function conf_init() {
static $conf = '';
......
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