1 update.inc | update_finished($success, $results, $operations) |
Finishes the update process and stores the results for eventual display.
After the updates run, all caches are flushed. The update results are stored into the session (for example, to be displayed on the update results page in update.php). Additionally, if the site was off-line, now that the update process is completed, the site is set back online.
Parameters
$success: Indicate that the batch API tasks were all completed successfully.
$results: An array of all the results that were updated in update_do_one().
$operations: A list of all the operations that had not been completed by the batch API.
See also
File
- core/
includes/ update.inc, line 700 - Backdrop site update API.
Code
function update_finished($success, $results, $operations) {
// Clear the caches in case the data has been updated.
backdrop_flush_all_caches();
$_SESSION['update_results'] = $results;
$_SESSION['update_success'] = $success;
$_SESSION['updates_remaining'] = $operations;
// Now that the update is done, we can put the site back online if it was
// previously in maintenance mode.
if (isset($_SESSION['maintenance_mode']) && $_SESSION['maintenance_mode'] == FALSE) {
state_set('maintenance_mode', FALSE);
unset($_SESSION['maintenance_mode']);
}
}