Merge remote-tracking branch 'origin/master' into 0.10.0
This commit is contained in:
@@ -101,7 +101,7 @@ class CustomerBackups extends ApiCommand implements ResourceEntity
|
||||
Database::pexecute($sel_stmt);
|
||||
$result = array();
|
||||
while ($entry = $sel_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$entry['data'] = unserialize($entry['data']);
|
||||
$entry['data'] = json_decode($entry['data'], true);
|
||||
if (in_array($entry['data']['customerid'], $customer_ids)) {
|
||||
$result[] = $entry;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ class DomainZones extends ApiCommand implements ResourceEntity
|
||||
|
||||
// check for duplicate
|
||||
foreach ($dom_entries as $existing_entry) {
|
||||
// compare serialized string of array
|
||||
// compare json-encoded string of array
|
||||
$check_entry = $existing_entry;
|
||||
// new entry has no ID yet
|
||||
unset($check_entry['id']);
|
||||
@@ -225,9 +225,9 @@ class DomainZones extends ApiCommand implements ResourceEntity
|
||||
$check_entry['prio'] = (int) $check_entry['prio'];
|
||||
$check_entry['ttl'] = (int) $check_entry['ttl'];
|
||||
$check_entry['domain_id'] = (int) $check_entry['domain_id'];
|
||||
// serialize both
|
||||
$check_entry = serialize($check_entry);
|
||||
$new = serialize($new_entry);
|
||||
// encode both
|
||||
$check_entry = json_encode($check_entry);
|
||||
$new = json_encode($new_entry);
|
||||
// compare
|
||||
if ($check_entry === $new) {
|
||||
$errors[] = $this->lng['error']['dns_duplicate_entry'];
|
||||
|
||||
@@ -314,7 +314,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
$ssl_redirect = 0;
|
||||
$letsencrypt = 0;
|
||||
$http2 = 0;
|
||||
// we need this for the serialize
|
||||
// we need this for the json_encode
|
||||
// if ssl is disabled or no ssl-ip/port exists
|
||||
$ssl_ipandports[] = - 1;
|
||||
|
||||
@@ -383,7 +383,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
}
|
||||
|
||||
if (count($ssl_ipandports) == 0) {
|
||||
// we need this for the serialize
|
||||
// we need this for the json_encode
|
||||
// if ssl is disabled or no ssl-ip/port exists
|
||||
$ssl_ipandports[] = - 1;
|
||||
}
|
||||
@@ -900,7 +900,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
$ssl_redirect = 0;
|
||||
$letsencrypt = 0;
|
||||
$http2 = 0;
|
||||
// we need this for the serialize
|
||||
// we need this for the json_encode
|
||||
// if ssl is disabled or no ssl-ip/port exists
|
||||
$ssl_ipandports[] = - 1;
|
||||
|
||||
@@ -993,7 +993,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
}
|
||||
|
||||
if (count($ssl_ipandports) == 0) {
|
||||
// we need this for the serialize
|
||||
// we need this for the json_encode
|
||||
// if ssl is disabled or no ssl-ip/port exists
|
||||
$ssl_ipandports[] = - 1;
|
||||
}
|
||||
@@ -1532,7 +1532,7 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
);
|
||||
}
|
||||
if (! empty($p_ipandports) && ! is_array($p_ipandports)) {
|
||||
$p_ipandports = unserialize($p_ipandports);
|
||||
$p_ipandports = json_decode($p_ipandports, true);
|
||||
}
|
||||
|
||||
// check whether there are ip usage restrictions
|
||||
|
||||
@@ -114,7 +114,7 @@ class paging {
|
||||
$this->userinfo = $userinfo;
|
||||
|
||||
if (!is_array($this->userinfo['lastpaging'])) {
|
||||
$this->userinfo['lastpaging'] = unserialize($this->userinfo['lastpaging']);
|
||||
$this->userinfo['lastpaging'] = json_decode($this->userinfo['lastpaging'], true);
|
||||
}
|
||||
|
||||
$this->table = $table;
|
||||
@@ -224,7 +224,7 @@ class paging {
|
||||
AND `adminsession` = :adminsession
|
||||
");
|
||||
$upd_data = array(
|
||||
'lastpaging' => serialize($this->userinfo['lastpaging']),
|
||||
'lastpaging' => json_encode($this->userinfo['lastpaging']),
|
||||
'hash' => $userinfo['hash'],
|
||||
'userid' => $userinfo['userid'],
|
||||
'ipaddr' => $userinfo['ipaddress'],
|
||||
|
||||
@@ -63,7 +63,7 @@ function getOutstandingTasks() {
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
if ($row['data'] != '') {
|
||||
$row['data'] = unserialize($row['data']);
|
||||
$row['data'] = json_decode($row['data'], true);
|
||||
}
|
||||
|
||||
// rebuilding webserver-configuration
|
||||
|
||||
@@ -70,7 +70,7 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '
|
||||
$data['uid'] = $param2;
|
||||
$data['gid'] = $param3;
|
||||
$data['store_defaultindex'] = $param4;
|
||||
$data = serialize($data);
|
||||
$data = json_encode($data);
|
||||
Database::pexecute($ins_stmt, array('type' => '2', 'data' => $data));
|
||||
|
||||
} elseif ($type == '6'
|
||||
@@ -78,7 +78,7 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '
|
||||
) {
|
||||
$data = array();
|
||||
$data['loginname'] = $param1;
|
||||
$data = serialize($data);
|
||||
$data = json_encode($data);
|
||||
Database::pexecute($ins_stmt, array('type' => '6', 'data' => $data));
|
||||
|
||||
} elseif ($type == '7'
|
||||
@@ -88,7 +88,7 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '
|
||||
$data = array();
|
||||
$data['loginname'] = $param1;
|
||||
$data['email'] = $param2;
|
||||
$data = serialize($data);
|
||||
$data = json_encode($data);
|
||||
Database::pexecute($ins_stmt, array('type' => '7', 'data' => $data));
|
||||
|
||||
} elseif ($type == '8'
|
||||
@@ -98,13 +98,13 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '
|
||||
$data = array();
|
||||
$data['loginname'] = $param1;
|
||||
$data['homedir'] = $param2;
|
||||
$data = serialize($data);
|
||||
$data = json_encode($data);
|
||||
Database::pexecute($ins_stmt, array('type' => '8', 'data' => $data));
|
||||
|
||||
} elseif ($type == '20'
|
||||
&& is_array($param1)
|
||||
) {
|
||||
$data = serialize($param1);
|
||||
$data = json_encode($param1);
|
||||
Database::pexecute($ins_stmt, array('type' => '20', 'data' => $data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,8 @@ function getDomainRedirectCode($domainid = 0) {
|
||||
$default = '301';
|
||||
if (Settings::Get('customredirect.enabled') == '1') {
|
||||
$all_codes = getRedirectCodes(false);
|
||||
$default = $all_codes[Settings::Get('customredirect.default')];
|
||||
$_default = $all_codes[Settings::Get('customredirect.default')];
|
||||
$default = ($_default == '---') ? $default : $_default;
|
||||
}
|
||||
$code = $default;
|
||||
if ($domainid > 0) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
$version = '0.10.0';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
$dbversion = '201805240';
|
||||
$dbversion = '201805290';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
$branding = '';
|
||||
|
||||
Reference in New Issue
Block a user