mirror of
https://github.com/loewexy/pdnsmanager.git
synced 2025-01-15 18:52:20 +01:00
Fixed error where domains with exactly a soa record where not found
This commit is contained in:
parent
8ffda92071
commit
bf9f68a450
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
');
|
||||
|
|
Loading…
Reference in a new issue