summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-15 02:08:41 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-15 02:08:41 +0000
commitb692036962b8d2c5c2b12749cf662d537a889375 (patch)
treedc7d6b70c5b91835373b474f3a7c4f4404541f55 /install.php
parent3472adb2ca21c815ff0fdbc63e21b03029fc051c (diff)
downloadbrdo-b692036962b8d2c5c2b12749cf662d537a889375.tar.gz
brdo-b692036962b8d2c5c2b12749cf662d537a889375.tar.bz2
#509392 by adrian: Add .info files for installation profiles.
Diffstat (limited to 'install.php')
-rw-r--r--install.php27
1 files changed, 11 insertions, 16 deletions
diff --git a/install.php b/install.php
index ba10ef279..b76bb6017 100644
--- a/install.php
+++ b/install.php
@@ -102,8 +102,6 @@ function install_main() {
install_no_profile_error();
}
- // Load the profile.
- require_once DRUPAL_ROOT . "/profiles/$profile/$profile.profile";
// Locale selection
if (!empty($_GET['locale'])) {
@@ -113,6 +111,10 @@ function install_main() {
install_goto("install.php?profile=$profile&locale=$install_locale");
}
+ // Load the profile.
+ require_once DRUPAL_ROOT . "/profiles/$profile/$profile.profile";
+ $info = install_profile_info($profile, $install_locale);
+
// Tasks come after the database is set up
if (!$task) {
global $db_url;
@@ -151,7 +153,7 @@ function install_main() {
// Save the list of other modules to install for the 'profile-install'
// task. variable_set() can be used now that system.module is installed
// and drupal is bootstrapped.
- $modules = drupal_get_profile_modules($profile, $install_locale);
+ $modules = $info['dependencies'];
variable_set('install_profile_modules', array_diff($modules, array('system')));
}
@@ -437,6 +439,7 @@ function install_select_profile() {
}
}
+
/**
* Form API array definition for the profile selection form.
*
@@ -451,12 +454,8 @@ function install_select_profile_form(&$form_state, $profile_files) {
foreach ($profile_files as $profile) {
include_once DRUPAL_ROOT . '/' . $profile->filepath;
-
- // Load profile details and store them for later retrieval.
- $function = $profile->name . '_profile_details';
- if (function_exists($function)) {
- $details = $function();
- }
+
+ $details = install_profile_info($profile->name);
$profiles[$profile->name] = $details;
// Determine the name of the profile; default to file name if defined name
@@ -970,15 +969,11 @@ function install_task_list($active = NULL) {
unset($tasks['profile-select']);
$tasks['profile-install-batch'] = st('Install site');
}
-
// Add tasks defined by the profile.
if ($profile) {
- $function = $profile . '_profile_task_list';
- if (function_exists($function)) {
- $result = $function();
- if (is_array($result)) {
- $tasks += $result;
- }
+ $info = install_profile_info($profile);
+ if (array_key_exists('tasks', $info)) {
+ $tasks += $info['tasks'];
}
}