# HG changeset patch # User peter # Date 1207595463 0 # Node ID a8228f676bf713d33d18d98fc67d71c6ed595387 # Parent 7863d881b8a58045018d829546e25005ab5ea7c8 [feladat @ 240] Bugfix: when a zone has no records (eg a incorrect slave) it was not possible to delete this zone. Modified the query to fetch the records of the zone with a LEFT OUTER JOIN so there still will be a result when an empty zone is selected. This closes ticket:25. Bugfix: Made the query compatible with pgsql diff -r 7863d881b8a5 -r a8228f676bf7 inc/record.inc.php --- a/inc/record.inc.php Sun Apr 06 18:54:52 2008 +0000 +++ b/inc/record.inc.php Mon Apr 07 19:11:03 2008 +0000 @@ -599,10 +599,9 @@ domains.name AS name, domains.master AS master_ip, count(records.domain_id) AS record_count - FROM domains, records + FROM domains LEFT OUTER JOIN records ON domains.id = records.domain_id WHERE domains.id = " . $db->quote($zone_id) . " - AND domains.id = records.domain_id - GROUP BY domains.id"; + GROUP BY domains.id, domains.type, domains.name, domains.master"; $result = $db->query($query); if (PEAR::isError($result)) { error($result->getMessage()); return false; }