function install_from_db_install_finished in Open Atrium 7.2
Finishes importing files at end of installation. COPIED from install.core.inc but no longer calls drupal_run_cron since we just installed the correct module versions for the distro that we desire.
Parameters
array $install_state: An array of information about the current installation state.
Return value
string A message informing the user that the installation is complete.
1 string reference to 'install_from_db_install_finished'
- install_from_db_install_tasks_alter in install_from_db/
install_from_db.profile - CALL THIS from your profile_install_tasks_alter() hook function.
File
- install_from_db/
install_from_db.profile, line 415 - Install profile helper to add option for importing from database.
Code
function install_from_db_install_finished(array &$install_state) {
drupal_set_title(st('@drupal installation complete', array(
'@drupal' => drupal_install_profile_distribution_name(),
)), PASS_THROUGH);
$messages = drupal_set_message();
$output = '<p>' . st('Congratulations, you installed @drupal!', array(
'@drupal' => drupal_install_profile_distribution_name(),
)) . '</p>';
$output .= '<p>' . (isset($messages['error']) ? st('Review the messages above before visiting <a href="@url">your new site</a>.', array(
'@url' => url(''),
)) : st('<a href="@url">Visit your new site</a>.', array(
'@url' => url(''),
))) . '</p>';
// Flush all caches to ensure that any full bootstraps during the installer
// do not leave stale cached data, and that any content types or other items
// registered by the installation profile are registered correctly.
drupal_flush_all_caches();
// Remember the profile which was used.
variable_set('install_profile', drupal_get_profile());
// Installation 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);
// Run cron to populate update status tables (if available) so that users
// will be warned if they've installed an out of date Drupal version.
// Will also trigger indexing of profile-supplied content or feeds.
//
// NO! Don't do this after installing profile from DB since we have the
// module versions we want and the Update module is potentially enabled
//
// drupal_cron_run();
//
// Mark cron as run so it doesn't run on next page load either.
variable_set('cron_last', REQUEST_TIME);
return $output;
}