diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-08-08 21:18:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-08-08 21:18:04 +0000 |
commit | 3c975f4bb8d3975dc73444e47d01dd98e9b2b37a (patch) | |
tree | f783283c052c291c10f5c5035aaa417643fc1d24 | |
parent | 3c0ad23f7df98abceabd3f8f92cd5358f76a0ed0 (diff) | |
download | brdo-3c975f4bb8d3975dc73444e47d01dd98e9b2b37a.tar.gz brdo-3c975f4bb8d3975dc73444e47d01dd98e9b2b37a.tar.bz2 |
- Patch #77549 by adrian: install profiles should be in their own directory.
-rw-r--r-- | includes/install.inc | 4 | ||||
-rw-r--r-- | install.php | 5 | ||||
-rw-r--r-- | modules/system/system.module | 6 | ||||
-rw-r--r-- | profiles/default/default.profile (renamed from profiles/default.profile) | 0 |
4 files changed, 11 insertions, 4 deletions
diff --git a/includes/install.inc b/includes/install.inc index 12f9560fd..77dd88d54 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -259,7 +259,7 @@ function drupal_get_install_files($module_list = array()) { function drupal_verify_profile($profile) { include_once './includes/file.inc'; - $profile_file = "./profiles/$profile.profile"; + $profile_file = "./profiles/$profile/$profile.profile"; if (!isset($profile) || !file_exists($profile_file)) { _install_no_profile_error(); @@ -551,4 +551,4 @@ function install_goto($path) { function st($string, $args = array()) { require_once './includes/theme.inc'; return strtr($string, array_map('theme_placeholder', $args)); -}
\ No newline at end of file +} diff --git a/install.php b/install.php index ed1636af6..cff4a0ae1 100644 --- a/install.php +++ b/install.php @@ -54,7 +54,7 @@ function install_main() { _install_no_profile_error(); } // Load the profile. - require_once "./profiles/$profile.profile"; + require_once "./profiles/$profile/$profile.profile"; // Change the settings.php information if verification failed earlier. if (!$verify) { @@ -414,6 +414,8 @@ function install_already_done_error() { */ function install_complete($profile) { global $base_url; + // Store install profile for later use. + variable_set('install_profile', $profile); // Bootstrap newly installed Drupal, while preserving existing messages. $messages = $_SESSION['messages']; @@ -436,7 +438,6 @@ function install_complete($profile) { $msg = drupal_set_message() ? 'Please review the messages above before continuing on to <a href="%url">your new site</a>.' : 'You may now visit <a href="%url">your new site</a>.'; $output .= strtr('<p>'. $msg .'</p>', array('%url' => url(''))); } - // Output page. print theme('maintenance_page', $output); } diff --git a/modules/system/system.module b/modules/system/system.module index 5aaf97a63..89d6a7bef 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -954,11 +954,17 @@ function system_default_region($theme) { */ function system_listing($mask, $directory, $key = 'name', $min_depth = 1) { $config = conf_path(); + $profile = variable_get('install_profile', 'default'); $searchdir = array($directory); $files = array(); // Always search sites/all/* as well as the global directories $searchdir[] = 'sites/all'; + + if (file_exists("profiles/$profile/$directory")) { + $searchdir[] = "profiles/$profile/$directory"; + } + if (file_exists("$config/$directory")) { $searchdir[] = "$config/$directory"; } diff --git a/profiles/default.profile b/profiles/default/default.profile index 158477e56..158477e56 100644 --- a/profiles/default.profile +++ b/profiles/default/default.profile |