Setting update version & time on success

pull/5830/head
Philipp Holzer 2018-10-07 10:42:14 +02:00
rodzic 26aee23254
commit 4ae985e5ed
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 517BE60E2CE5C8A5
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -1595,7 +1595,8 @@ function admin_page_dbsync(App $a)
$retval = DBStructure::update(false, true); $retval = DBStructure::update(false, true);
if ($retval === '') { if ($retval === '') {
$o .= L10n::t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />"; $o .= L10n::t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
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 { } else {
$o .= L10n::t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />"; $o .= L10n::t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
} }

Wyświetl plik

@ -47,7 +47,8 @@ class Update
Lock::release('dbupdate'); Lock::release('dbupdate');
return; return;
} else { } 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 // run the update_nnnn functions in update.php