getVersion()); ?>
Our repository is now running at version version; ?>.
You can follow this
Update Tutorial
to update your files and get the latest version.
error = '';
foreach ($lines as $line) {
if (substr($line, 0, 2) == '--' || $line == '') {
continue;
}
$templine .= $line;
if (substr(trim($line), -1, 1) == ';') {
//echo $templine;echo '
';
if (!$global['mysqli']->query($templine)) {
$obj->error = ('Error performing query \'
' . $templine . '\': ' . $global['mysqli']->error . '
');
echo json_encode($obj);
//exit;
}
$templine = '';
}
}
// insert configuration if is version 1.0
if ($config->currentVersionLowerThen('1.0')) {
$sql = "DELETE FROM configurations WHERE id = 1 ";
if ($global['mysqli']->query($sql) !== true) {
$obj->error = "Error deleting configuration: " . $global['mysqli']->error;
echo json_encode($obj);
exit;
}
$sql = "INSERT INTO configurations (id, video_resolution, users_id, version, created, modified) VALUES (1, '426:240', " . User::getId() . ",'1.0', now(), now())";
if ($global['mysqli']->query($sql) !== true) {
$obj->error = "Error creating configuration: " . $global['mysqli']->error;
echo json_encode($obj);
exit;
}
}
if ($config->currentVersionEqual('1.0')) {
$sql = "UPDATE configurations SET users_id = " . User::getId() . ", version = '1.1', webSiteTitle = '{$global['webSiteTitle']}', language = '{$global['language']}', contactEmail = '{$global['contactEmail']}', modified = now() WHERE id = 1";
if ($global['mysqli']->query($sql) !== true) {
$obj->error = "Error creating configuration: " . $global['mysqli']->error;
echo json_encode($obj);
exit;
}
}
//$renamed = rename("{$global['systemRootPath']}updateDb.sql", "{$global['systemRootPath']}updateDb.sql.old");
?>