1 install.core.inc | install_finished(&$install_state) |
Finishes importing files at end of installation.
Parameters
array $install_state: An array of information about the current installation state.
Return value
A message informing the user that the installation is complete.:
File
- core/
includes/ install.core.inc, line 2067 - API functions for installing Backdrop.
Code
function install_finished(&$install_state) {
// 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.
backdrop_flush_all_caches();
// Remember the profile which was used.
config_set('system.core', 'install_profile', $install_state['parameters']['profile']);
// Installation profiles are always loaded last
db_update('system')
->fields(array('weight' => 1000))
->condition('type', 'module')
->condition('name', $install_state['parameters']['profile'])
->execute();
// Cache a fully-built schema.
backdrop_get_schema(NULL, TRUE);
// Set a state indicating that Backdrop is fully installed. Prevents further
// visiting of install.php.
state_set('install_task', 'done');
// Record if UTF8MB4 support was enabled during the installation.
$connection = Database::getConnection();
if ($connection->utf8mb4IsActive()) {
state_set('database_utf8mb4_active', TRUE);
}
// Run cron to populate update status tables (if available) so that users
// will be warned if they've installed an out of date Backdrop version.
// Will also trigger indexing of profile-supplied content or feeds.
backdrop_cron_run();
$profile = backdrop_install_profile_distribution_name();
$message = st('Thank you for installing @profile!', array('@profile' => $profile));
// Confirming that the Dashboard module is enabled.
if (module_exists('dashboard')) {
$message .= '<br>' . st('If you are new to @profile, then the <a href="@dashboard">Dashboard</a> may be a good place to start.', array('@profile' => $profile, '@dashboard' => url('admin/dashboard')));
}
if (!backdrop_is_cli()) {
backdrop_set_message($message);
backdrop_goto('<front>');
}
}