Don't write version if upgrade failed

hg/feature/cdb-packed
kaetemi 11 years ago
parent fed7dc17ac
commit 795b5a9aa0

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

Loading…
Cancel
Save