From dc516c24685518b41bcce0751caf286dc65e471f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 17 Mar 2021 15:39:55 +0100 Subject: [locations/rebootcontrol] Change ENUM constants; display next event --- install.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'install.php') diff --git a/install.php b/install.php index fa1258e0..f0bb1c72 100644 --- a/install.php +++ b/install.php @@ -43,6 +43,17 @@ define('UPDATE_NOOP', 'UPDATE_NOOP'); // Nothing had to be done, everything is u define('UPDATE_RETRY', 'UPDATE_RETRY'); // Install/update process failed, but should be retried later. define('UPDATE_FAILED', 'UPDATE_FAILED'); // Fatal error occurred, retry will not resolve the issue. +/** + * Take the return value of a Database::exec() call and emit failure + * if it's false. + */ +function handleUpdateResult($res) +{ + if ($res !== false) + return; + finalResponse(UPDATE_FAILED, Database::lastError()); +} + /* * Helper functions for dealing with the database */ -- cgit v1.2.3-55-g7522