From 4ae985e5ed31ba664a3f78e136e531774a5b352c Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 7 Oct 2018 10:42:14 +0200 Subject: [PATCH] Setting update version & time on success --- mod/admin.php | 3 ++- src/Core/Update.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 9dd907e11c..08c2ecbbc4 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1595,7 +1595,8 @@ function admin_page_dbsync(App $a) $retval = DBStructure::update(false, true); if ($retval === '') { $o .= L10n::t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "
"; - Config::set('database', 'last_successful_update', time()); + Config::set('database', 'last_successful_update', DB_UPDATE_VERSION); + Config::set('database', 'last_successful_update_time', time()); } else { $o .= L10n::t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "
"; } diff --git a/src/Core/Update.php b/src/Core/Update.php index 8b11d8dcff..a524830e75 100644 --- a/src/Core/Update.php +++ b/src/Core/Update.php @@ -47,7 +47,8 @@ class Update Lock::release('dbupdate'); return; } else { - Config::set('database', 'last_successful_update', time()); + Config::set('database', 'last_successful_update', $current); + Config::set('database', 'last_successful_update_time', time()); } // run the update_nnnn functions in update.php -- 2.39.5