From bf9f68a4501a316f3581bc83645e9fc697a4f37f Mon Sep 17 00:00:00 2001 From: Lukas Metzger Date: Thu, 10 May 2018 20:32:28 +0200 Subject: [PATCH] Fixed error where domains with exactly a soa record where not found --- backend/src/operations/Domains.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/operations/Domains.php b/backend/src/operations/Domains.php index 1450981..d31567a 100644 --- a/backend/src/operations/Domains.php +++ b/backend/src/operations/Domains.php @@ -82,7 +82,7 @@ class Domains $query = $this->db->prepare(' SELECT D.id,D.name,D.type,D.master,count(R.domain_id) AS records FROM domains D - LEFT OUTER JOIN records R ON D.id = R.domain_id + LEFT OUTER JOIN records R ON D.id = R.domain_id AND R.type <> \'SOA\' LEFT OUTER JOIN permissions P ON D.id = P.domain_id WHERE (P.user_id=:userId OR :userIsAdmin) AND (R.type <> \'SOA\' OR R.type IS NULL) @@ -223,7 +223,7 @@ class Domains { $query = $this->db->prepare(' SELECT D.id,D.name,D.type,D.master,COUNT(R.domain_id) AS records FROM domains D - LEFT OUTER JOIN records R ON D.id = R.domain_id + LEFT OUTER JOIN records R ON D.id = R.domain_id AND R.type <> \'SOA\' WHERE D.id=:id AND (R.type <> \'SOA\' OR R.type IS NULL) GROUP BY D.id,D.name,D.type,D.master ');