From 5c950fbbc5f574d34d9d12f394b0ea2838133583 Mon Sep 17 00:00:00 2001 From: Florian Schaal <florian@schaal-24.de> Date: Fri, 22 May 2015 21:00:32 +0200 Subject: [PATCH] add missing global $app --- interface/web/dns/dns_a_edit.php | 1 + interface/web/dns/dns_cname_edit.php | 1 + 2 files changed, 2 insertions(+) diff --git a/interface/web/dns/dns_a_edit.php b/interface/web/dns/dns_a_edit.php index 5b060c33ab..595ebcc92c 100644 --- a/interface/web/dns/dns_a_edit.php +++ b/interface/web/dns/dns_a_edit.php @@ -46,6 +46,7 @@ require_once './dns_edit_base.php'; class page_action extends dns_page_action { protected function checkDuplicate() { + global $app; //* Check for duplicates where IP and hostname are the same $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'A' AND name = ? AND zone = ? and data = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->dataRecord["data"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); if($tmp['number'] > 0) return true; diff --git a/interface/web/dns/dns_cname_edit.php b/interface/web/dns/dns_cname_edit.php index b04af40051..403650c1c4 100644 --- a/interface/web/dns/dns_cname_edit.php +++ b/interface/web/dns/dns_cname_edit.php @@ -46,6 +46,7 @@ require_once './dns_edit_base.php'; class page_action extends dns_page_action { protected function checkDuplicate() { + global $app; //* Check for duplicates where IP and hostname are the same $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'A' AND name = ? AND zone = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); if($tmp['number'] > 0) return true; -- GitLab