summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-13 07:09:26 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-13 07:09:26 +0000
commit89580246ee27d13c943172e4956fa266bcf8754a (patch)
tree35f046ff287e25ae4b63ffa1b96cde2b746353ca /install.php
parent1d09ec33bdcbcc761a6526e8982859600bd6958e (diff)
downloadbrdo-89580246ee27d13c943172e4956fa266bcf8754a.tar.gz
brdo-89580246ee27d13c943172e4956fa266bcf8754a.tar.bz2
#559294 by David_Rothstein: Allow install profiles to alter or override the task list.
Diffstat (limited to 'install.php')
-rw-r--r--install.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/install.php b/install.php
index d727e65fe..0a53ebf6a 100644
--- a/install.php
+++ b/install.php
@@ -567,7 +567,7 @@ function install_tasks($install_state) {
// Now add any tasks defined by the installation profile.
if (!empty($install_state['parameters']['profile'])) {
- $function = $install_state['parameters']['profile'] . '_profile_tasks';
+ $function = $install_state['parameters']['profile'] . '_install_tasks';
if (function_exists($function)) {
$result = $function($install_state);
if (is_array($result)) {
@@ -589,6 +589,18 @@ function install_tasks($install_state) {
),
);
+ // Allow the installation profile to modify the full list of tasks.
+ if (!empty($install_state['parameters']['profile'])) {
+ $profile_file = DRUPAL_ROOT . '/profiles/' . $install_state['parameters']['profile'] . '/' . $install_state['parameters']['profile'] . '.profile';
+ if (is_file($profile_file)) {
+ include_once $profile_file;
+ $function = $install_state['parameters']['profile'] . '_install_tasks_alter';
+ if (function_exists($function)) {
+ $function($tasks, $install_state);
+ }
+ }
+ }
+
// Fill in default parameters for each task before returning the list.
foreach ($tasks as $task_name => &$task) {
$task += array(