1 installer.browser.inc | _installer_browser_batch_install_releases_finished($success, $results, $operations) |
Batch API callback: shows a message and finishes up the batch.
File
- core/
modules/ installer/ installer.browser.inc, line 352 - Various functions that are required by the Installer browse pages.
Code
function _installer_browser_batch_install_releases_finished($success, $results, $operations) {
// Although we turn off maintenance mode immediately, the message that the
// site is offline displays until a page reload. We wipe the messages cache
// here to avoid this.
backdrop_get_messages();
// Restore the maintenance mode to what it was at the start.
if (isset($_SESSION['maintenance_mode'])) {
state_set('maintenance_mode', $_SESSION['maintenance_mode']);
unset($_SESSION['maintenance_mode']);
}
unset($_SESSION['installer_browser_install_releases_list']);
if ($success) {
if (!empty($results)) {
if (!empty($results['failures'])) {
backdrop_set_message(format_plural(count($results['failures']), 'Failed to install one project.', 'Failed to install @count projects.'), 'error');
foreach ($results['failures'] as $message) {
backdrop_set_message($message, 'error');
}
}
}
}
else {
backdrop_set_message(t('Error installing projects.'), 'error');
backdrop_goto('admin/installer/install/select_versions');
}
$projects = installer_browser_get_installed_projects();
$missing = installer_browser_get_missing_dependencies($projects);
// If there are missing dependencies, go to install dependencies.
if (count($missing) > 0) {
backdrop_goto('admin/installer/install/install_dependencies');
}
else {
installer_browser_get_destination_after_install();
}
}