Don't write version if upgrade failed

This commit is contained in:
kaetemi 2014-09-08 00:21:30 +02:00
parent fed7dc17ac
commit 795b5a9aa0

View file

@ -15,10 +15,12 @@ $db_ring_domain = 1;
function set_db_version($continue_r, $name, $version) {
$continue = $continue_r;
if (file_put_contents("db_version_" . $name, (string)$version)) {
} else {
printalert("danger", "Failed to set database version");
$continue = false;
if ($continue) {
if (file_put_contents("db_version_" . $name, (string)$version)) {
} else {
printalert("danger", "Failed to set database version");
$continue = false;
}
}
return $continue;