Verifies and returns the last installation task that was completed.
The last completed task, if there is one. An exception is thrown if Drupal is already installed.
function install_verify_completed_task() {
try {
if ($result = db_query("SELECT value FROM {variable} WHERE name = :name", array(
'name' => 'install_task',
))) {
$task = unserialize($result
->fetchField());
}
} catch (Exception $e) {
}
if (isset($task)) {
if ($task == 'done') {
throw new Exception(install_already_done_error());
}
return $task;
}
}