Fix version update
This commit is contained in:
parent
edbd2da4eb
commit
9dea19b9b1
|
@ -315,8 +315,15 @@ class meta extends Repo_i {
|
|||
}
|
||||
|
||||
if($default != null){
|
||||
$set .= "default=:default,";
|
||||
$set .= "`default`=:default,";
|
||||
$execute["default"] = $default?1:0;
|
||||
|
||||
//if default = true, set previous default version to non-default
|
||||
if($default == true){
|
||||
|
||||
$req = $this->pdo->prepare("UPDATE meta_vhost.`databases` SET `default`=0 WHERE departement_iddepartement=:idDep");
|
||||
$req->execute(["idDep" => $_SESSION['CurrentDepartmentId']]);
|
||||
}
|
||||
}
|
||||
|
||||
$set = rtrim($set,",");
|
||||
|
|
Loading…
Reference in New Issue