From 7ca2762dc01c8aeb2f0fef6bb404a5468714bf5b Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Wed, 26 Jun 2019 16:05:30 +0200 Subject: [PATCH] Syntax errors in PHP 5.3.3, fixes #5129 --- interface/lib/app.inc.php | 3 ++- interface/web/dns/dns_caa_edit.php | 3 ++- interface/web/mail/ajax_get_json.php | 6 +++++- interface/web/sites/database_quota_stats.php | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index ccc80fd254..b02ae8526d 100755 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -335,7 +335,8 @@ class app { } private function get_cookie_domain() { - $proxy_panel_allowed = $this->getconf->get_security_config('permissions')['reverse_proxy_panel_allowed']; + $sec_config = $this->getconf->get_security_config('permissions'); + $proxy_panel_allowed = $sec_config['reverse_proxy_panel_allowed']; if ($proxy_panel_allowed == 'all') { return ''; } diff --git a/interface/web/dns/dns_caa_edit.php b/interface/web/dns/dns_caa_edit.php index c3d8618414..0151600e48 100644 --- a/interface/web/dns/dns_caa_edit.php +++ b/interface/web/dns/dns_caa_edit.php @@ -165,7 +165,8 @@ class page_action extends tform_actions { // Set name if($this->dataRecord['additional'] != '') { - $temp = explode(',', $this->dataRecord['additional'])[0]; // if we have more hostnames the interface-plugin will be used + $temp = explode(',', $this->dataRecord['additional']); + $temp = $temp[0]; // if we have more hostnames the interface-plugin will be used $temp = trim($temp,'.'); if(trim($temp != '')) $this->dataRecord['name'] = $temp.'.'.$this->dataRecord['name']; unset($temp); diff --git a/interface/web/mail/ajax_get_json.php b/interface/web/mail/ajax_get_json.php index 2a1a756167..17fd4cf45a 100644 --- a/interface/web/mail/ajax_get_json.php +++ b/interface/web/mail/ajax_get_json.php @@ -40,7 +40,11 @@ $domain_id = $_GET['domain_id']; if($type == 'create_dkim' && $domain_id != ''){ $dkim_public = $_GET['dkim_public']; $dkim_selector = $_GET['dkim_selector']; - $domain=@(is_numeric($domain_id))?$app->db->queryOneRecord("SELECT domain FROM domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), $domain_id)['domain']:$domain_id; + $domain = $domain_id; + if(is_numeric($domain_id)) { + $temp = $app->db->queryOneRecord("SELECT domain FROM domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), $domain_id); + $domain = $temp['domain']; + } $rec = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ?", $domain); $server_id = $rec['server_id']; $maildomain = $rec['domain']; diff --git a/interface/web/sites/database_quota_stats.php b/interface/web/sites/database_quota_stats.php index 148aa127ae..5f550cf8d1 100644 --- a/interface/web/sites/database_quota_stats.php +++ b/interface/web/sites/database_quota_stats.php @@ -83,7 +83,8 @@ class list_action extends listform_actions { } else { $web_database = $app->db->queryOneRecord("SELECT * FROM web_database WHERE database_id = ?", $rec[$this->idx_key]); $rec['database'] = $rec['database_name']; - $rec['server_name'] = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $web_database['server_id'])['server_name']; + $temp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $web_database['server_id']); + $rec['server_name'] = $temp['server_name']; $sys_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE groupid = ?", $web_database['sys_groupid']); $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $sys_group['client_id']); $rec['client'] = $client['username']; -- GitLab