Skip to content
Snippets Groups Projects
Commit 3c975f4b authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #77549 by adrian: install profiles should be in their own directory.

parent 3c0ad23f
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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
}
......@@ -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);
}
......
......@@ -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";
}
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment