mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Don't write version if upgrade failed
This commit is contained in:
parent
16cdf3b765
commit
c691a999b1
1 changed files with 6 additions and 4 deletions
|
@ -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…
Reference in a new issue