Merge remote-tracking branch 'origin/master' into 0.10.0
This commit is contained in:
@@ -660,6 +660,7 @@ opcache.interned_strings_buffer'),
|
||||
('system', 'logfiles_format', ''),
|
||||
('system', 'logfiles_type', '1'),
|
||||
('system', 'logfiles_piped', '0'),
|
||||
('system', 'logfiles_script', ''),
|
||||
('api', 'enabled', '0'),
|
||||
('panel', 'decimal_places', '4'),
|
||||
('panel', 'adminmail', 'admin@SERVERNAME'),
|
||||
@@ -693,7 +694,7 @@ opcache.interned_strings_buffer'),
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'customer_hide_options', ''),
|
||||
('panel', 'version', '0.10.0'),
|
||||
('panel', 'db_version', '201805240');
|
||||
('panel', 'db_version', '201805290');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -1017,7 +1017,7 @@ class FroxlorInstall
|
||||
|
||||
// check for json extension
|
||||
$content .= $this->_status_message('begin', $this->_lng['requirements']['phpjson']);
|
||||
|
||||
|
||||
if (! extension_loaded('json')) {
|
||||
$content .= $this->_status_message('red', $this->_lng['requirements']['notinstalled']);
|
||||
$_die = true;
|
||||
|
||||
@@ -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