Index: /trunk/DNSDB.pm
===================================================================
--- /trunk/DNSDB.pm	(revision 383)
+++ /trunk/DNSDB.pm	(revision 384)
@@ -3302,7 +3302,9 @@
 
   my $sql = "SELECT r.record_id,r.host,r.type,r.val,r.ttl";
+  $sql .= ",l.description AS locname" if $def eq 'n';
   $sql .= ",r.distance,r.weight,r.port" if $rev eq 'n';
   $sql .= " FROM "._rectable($def,$rev)." r ";
   $sql .= "INNER JOIN rectypes t ON r.type=t.val ";	# for sorting by type alphabetically
+  $sql .= "LEFT JOIN locations l ON r.location=l.location " if $def eq 'n';
   $sql .= "WHERE "._recparent($def,$rev)." = ?";
   $sql .= " AND NOT r.type=$reverse_typemap{SOA}";
