Rename sites directory to be the new config repository
This commit is contained in:
parent
006992b900
commit
433e7eec80
31 changed files with 196 additions and 216 deletions
|
@ -2859,9 +2859,8 @@ function drupal_cron_cleanup() {
|
|||
* Return an array of system file objects.
|
||||
*
|
||||
* Returns an array of file objects of the given type from the site-wide
|
||||
* directory (i.e. modules/), the all-sites directory (i.e.
|
||||
* sites/all/modules/), the profiles directory, and site-specific directory
|
||||
* (i.e. sites/somesite/modules/). The returned array will be keyed using the
|
||||
* directory (i.e. modules/), the profiles directory and site-specific directory
|
||||
* (i.e. config/somesite/modules/). The returned array will be keyed using the
|
||||
* key specified (name, basename, filename). Using name or basename will cause
|
||||
* site-specific files to be prioritized over similar files in the default
|
||||
* directories. That is, if a file with the same name appears in both the
|
||||
|
@ -2872,8 +2871,7 @@ function drupal_cron_cleanup() {
|
|||
* The regular expression of the files to find.
|
||||
* @param $directory
|
||||
* The subdirectory name in which the files are found. For example,
|
||||
* 'modules' will search in both modules/ and
|
||||
* sites/somesite/modules/.
|
||||
* 'modules' will search in modules/.
|
||||
* @param $key
|
||||
* The key to be passed to file_scan_directory().
|
||||
* @param $min_depth
|
||||
|
@ -2883,31 +2881,10 @@ function drupal_cron_cleanup() {
|
|||
* An array of file objects of the specified type.
|
||||
*/
|
||||
function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1) {
|
||||
global $profile;
|
||||
$config = conf_path();
|
||||
|
||||
// When this function is called during Drupal's initial installation process,
|
||||
// the name of the profile that's about to be installed is stored in the global
|
||||
// $profile variable. At all other times, the standard Drupal systems variable
|
||||
// table contains the name of the current profile, and we can call variable_get()
|
||||
// to determine what one is active.
|
||||
if (!isset($profile)) {
|
||||
$profile = variable_get('install_profile', 'default');
|
||||
}
|
||||
$searchdir = array($directory);
|
||||
$files = array();
|
||||
|
||||
// The 'profiles' directory contains pristine collections of modules and
|
||||
// themes as organized by a distribution. It is pristine in the same way
|
||||
// that /modules is pristine for core; users should avoid changing anything
|
||||
// there in favor of sites/all or sites/<domain> directories.
|
||||
if (file_exists("profiles/$profile/$directory")) {
|
||||
$searchdir[] = "profiles/$profile/$directory";
|
||||
}
|
||||
|
||||
// Always search sites/all/* as well as the global directories
|
||||
$searchdir[] = 'sites/all/'. $directory;
|
||||
|
||||
$config = conf_path();
|
||||
if (file_exists("$config/$directory")) {
|
||||
$searchdir[] = "$config/$directory";
|
||||
}
|
||||
|
|
Reference in a new issue