diff --git a/includes/install.inc b/includes/install.inc index 12f9560fd40f574a356d47fee0b4b17abfde781e..77dd88d54aa65cbd3b80981ea71b3d375d6d2925 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 ed1636af67427a32a900ac1346c36cb4e11bcdd0..cff4a0ae13df578cf6b816c322aedbb461063046 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 5aaf97a634b6284f2d76b71bd17629ecbaf83049..89d6a7bef01baf61d17af701e5b534cba8cc4493 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 similarity index 100% rename from profiles/default.profile rename to profiles/default/default.profile