Update schema to PSR-2

This commit is contained in:
pxgamer
2018-05-29 15:40:28 +01:00
parent bff8025b15
commit c82e68c9b2

View File

@@ -1,7 +1,6 @@
<?php <?php
// when db schema modifications are done, this function is run. // when db schema modifications are done, this function is run.
$dbversion = intval($_config['dbversion']); $dbversion = intval($_config['dbversion']);
$db->beginTransaction(); $db->beginTransaction();
if ($dbversion == 0) { if ($dbversion == 0) {
@@ -142,8 +141,7 @@ if($dbversion==6){
$dbversion++; $dbversion++;
} }
// update the db version to the latest one // update the db version to the latest one
if($dbversion!=$_config['dbversion']) $db->run("UPDATE config SET val=:val WHERE cfg='dbversion'",array(":val"=>$dbversion)); if ($dbversion != $_config['dbversion']) {
$db->run("UPDATE config SET val=:val WHERE cfg='dbversion'", [":val" => $dbversion]);
}
$db->commit(); $db->commit();
?>