Merge remote-tracking branch 'origin/master' into 0.10.0
This commit is contained in:
@@ -60,7 +60,7 @@ if (isFroxlorVersion('0.10.0')) {
|
||||
Database::query("ALTER TABLE `panel_admins` MODIFY `ip` varchar(500) NOT NULL default '-1';");
|
||||
$upd_stmt = Database::prepare("UPDATE `panel_admins` SET `ip` = :ip WHERE `adminid` = :adminid");
|
||||
foreach ($all_admins as $adm) {
|
||||
if ($admin['ip'] != -1) {
|
||||
if ($admin['ip'] != '-1') {
|
||||
Database::pexecute($upd_stmt, array('ip' => json_encode($adm['ip']), 'adminid' => $adm['adminid']));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3959,3 +3959,42 @@ if (isDatabaseVersion('201802250')) {
|
||||
|
||||
updateToDbVersion('201805240');
|
||||
}
|
||||
|
||||
if (isDatabaseVersion('201805240')) {
|
||||
|
||||
showUpdateStep("Adding webserver logfile-script settings");
|
||||
Settings::AddNew("system.logfiles_script", '');
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToDbVersion('201805241');
|
||||
}
|
||||
|
||||
if (isDatabaseVersion('201805241')) {
|
||||
|
||||
$do_update = true;
|
||||
showUpdateStep("Checking for required PHP json-extension");
|
||||
if (! extension_loaded('json')) {
|
||||
$do_update = false;
|
||||
lastStepStatus(2, 'not installed');
|
||||
} else {
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Checking for current cronjobs that need converting");
|
||||
$result_tasks_stmt = Database::query("
|
||||
SELECT * FROM `" . TABLE_PANEL_TASKS . "` ORDER BY `id` ASC
|
||||
");
|
||||
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_TASKS . "` SET `data` = :data WHERE `id` = :taskid");
|
||||
while ($row = $result_tasks_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
if (! empty($row['data'])) {
|
||||
$data = unserialize($row['data']);
|
||||
Database::pexecute($upd_stmt, array(
|
||||
'data' => json_encode($data),
|
||||
'taskid' => $row['id']
|
||||
));
|
||||
}
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToDbVersion('201805290');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user