diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-21 07:50:08 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-21 07:50:08 +0000 |
commit | 716293e0fbf1155b8e78c4bd2762c98275b8e6cb (patch) | |
tree | a8dd7691cd035f407268e41969ffbb033871bc36 /install.php | |
parent | d151ea91004abd0c771dfeea380ff4fef0fbf248 (diff) | |
download | brdo-716293e0fbf1155b8e78c4bd2762c98275b8e6cb.tar.gz brdo-716293e0fbf1155b8e78c4bd2762c98275b8e6cb.tar.bz2 |
#509398 by adrian: Turned install profiles into modules with full access to the Drupal API. Almost all WTFs/minute now removed from install profiles. Woohoo! :D
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/install.php b/install.php index 11f8d3010..35f8dc722 100644 --- a/install.php +++ b/install.php @@ -733,6 +733,11 @@ function install_system_module(&$install_state) { // variable_set() can be used now that system.module is installed and // Drupal is bootstrapped. $modules = $install_state['profile_info']['dependencies']; + + // The install profile is also a module, which needs to be installed + // after all the dependencies have been installed. + $modules[] = drupal_get_profile(); + variable_set('install_profile_modules', array_diff($modules, array('system'))); $install_state['database_tables_exist'] = TRUE; } @@ -1424,7 +1429,14 @@ function install_finished(&$install_state) { _drupal_flush_css_js(); // Remember the profile which was used. - variable_set('install_profile', $install_state['parameters']['profile']); + variable_set('install_profile', drupal_get_profile()); + + // Install profiles are always loaded last + db_update('system') + ->fields(array('weight' => 1000)) + ->condition('type', 'module') + ->condition('name', drupal_get_profile()) + ->execute(); // Cache a fully-built schema. drupal_get_schema(NULL, TRUE); |