Merge remote-tracking branch 'origin/master' into 0.10.0

This commit is contained in:
Michael Kaufmann
2018-06-01 08:01:09 +02:00
20 changed files with 100 additions and 49 deletions

View File

@@ -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;
}

View File

@@ -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'];

View File

@@ -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