diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 2c52334..eff7c39 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -407,19 +407,26 @@ function conf_path($require_settings = TRUE, $reset = FALSE) { /** * Finds the appropriate configuration directory for a given host and path. * - * Finds a matching configuration directory by stripping the website's hostname - * from left to right and pathname from right to left. The first configuration + * Finds a matching configuration directory file by stripping the website's + * hostname from left to right and pathname from right to left. By default, + * the directory must contain a 'settings.php' file for it to match. If the + * parameter $require_settings is set to FALSE, then a directory without a + * 'settings.php' file will match as well. The first configuration * file found will be used and the remaining ones will be ignored. If no * configuration file is found, returns a default value '$confdir/default'. See * default.settings.php for examples on how the URL is converted to a directory. * * If a file named sites.php is present in the $confdir, it will be loaded - * prior to scanning for directories. It should define an associative array - * named $sites, which maps domains to directories. $sites should be in the form - * of: + * prior to scanning for directories. + * + * Aliases are defined in an associative array named $sites. The array is + * written in the format: '..' => 'directory'. + * As an example, to create a directory alias for: + * http://www.drupal.org:8080/mysite/test whose configuration file is in + * sites/example.com, the array should be written as such: * @code * $sites = array( - * 'The URL to alias' => 'A directory within the sites directory', + * '8080.www.drupal.org.mysite.test' => 'example.com', * ); * @endcode * @@ -428,6 +435,9 @@ function conf_path($require_settings = TRUE, $reset = FALSE) { * "www.example.com:8080". * @param $script_name * The part of the url following the hostname, including the leading slash. + * @param $require_settings + * Defaults to TRUE. If TRUE, then only match directories with a + * 'settings.php' file. Otherwise match any directory. * * @return * The path of the matching configuration directory. diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 250d50e..5be6247 100755 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -10,22 +10,21 @@ * your modifications. Failure to remove write permissions to this file is a * security risk. * - * The configuration file to be loaded is based upon the rules below. - * - * If the multisite aliasing file named sites/sites.php is present, it will be + * The configuration file to be loaded is based upon the rules below. However + * if the multisite aliasing file named sites/sites.php is present, it will be * loaded, and the aliases in the array $sites will override the default * directory rules below. See sites/example.sites.php for more information about * aliases. * * The configuration directory will be discovered by stripping the website's * hostname from left to right and pathname from right to left. The first - * configuration file found will be used and any others will be ignored. If no + * configuration file found will be used and any others will be ignored. If no * other configuration file is found then the default configuration file at * 'sites/default' will be used. * * For example, for a fictitious site installed at - * http://www.drupal.org:8080/mysite/test/, the 'settings.php' is searched in - * the following directories: + * http://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched + * in the following directories: * * - sites/8080.www.drupal.org.mysite.test * - sites/www.drupal.org.mysite.test @@ -44,7 +43,7 @@ * * - sites/default * - * Notice that if you are installing on a non-standard port number, prefix the + * Not that if you are installing on a non-standard port number, prefix the * hostname with that number. For example, * http://www.drupal.org:8080/mysite/test/ could be loaded from * sites/8080.www.drupal.org.mysite.test/. diff --git a/sites/example.sites.php b/sites/example.sites.php index acf749f..15d8b23 100644 --- a/sites/example.sites.php +++ b/sites/example.sites.php @@ -20,10 +20,9 @@ * then you can safely ignore this file, and Drupal will ignore it too. * * Aliases are defined in an associative array named $sites. The array is - * written in the format: '..' => 'directory'. - * As an example, to create a directory alias for: - * http://www.drupal.org:8080/mysite/test whose configuration file is in - * sites/example.com, the array should be written as such: + * written in the format: '..' => 'directory'. As an + * example, to map http://www.drupal.org:8080/mysite/test to the configuration + * directory sites/example.com, the array should be defined as: * @code * $sites = array( * '8080.www.drupal.org.mysite.test' => 'example.com', @@ -39,30 +38,3 @@ * @see conf_path() * @see http://drupal.org/documentation/install/multi-site */ - -/** - * Example multi-site directory aliases. - * - * $sites should define an associative array which maps domains to directories. - * It should be in the form of: - * @code - * $sites = array( - * '..' => 'directory', - * ); - * @endcode - * - * The following examples look for a site configuration in sites/example.com - * @code - * URL: http://dev.drupal.org - * $sites['dev.drupal.org'] = 'example.com'; - * - * URL: http://localhost/example - * $sites['localhost.example'] = 'example.com'; - * - * URL: http://localhost:8080/example - * $sites['8080.localhost.example'] = 'example.com'; - * - * URL: http://www.drupal.org:8080/mysite/test/ - * $sites['8080.www.drupal.org.mysite.test'] = 'example.com'; - * @endcode - */