Allow sorting records by type
authorJamie Cameron <jcameron@webmin.com>
Wed, 26 Aug 2009 16:59:04 +0000 (09:59 -0700)
committerJamie Cameron <jcameron@webmin.com>
Wed, 26 Aug 2009 16:59:04 +0000 (09:59 -0700)
bind8/CHANGELOG
bind8/edit_recs.cgi
bind8/records-lib.pl

index c76952c..5f1d67c 100644 (file)
@@ -110,3 +110,5 @@ Fixed a bug that cause blocks like sortlist not be parsed properly, and possible
 Redirect and explanation modifiers can be viewed and edited in SPF records.
 Added a Module Config option for additional master IP addresses for remote slave zones.
 If nscd is running when BIND is restarted or a zone is applied, it will be signalled to re-read DNS caches too.
+---- Changes since 1.480 ----
+When all DNS records in a zone are shown, the Type column can be clicked on to sort them.
index c2b55f5..a60513d 100755 (executable)
@@ -137,7 +137,7 @@ if (!$access{'ro'} && $type eq 'master') {
        push(@tds, "width=5");
        }
 push(@hcols, "<a href='edit_recs.cgi?index=$in{'index'}&view=$in{'view'}&type=$in{'type'}&sort=1'>".($in{'type'} eq "PTR" ? $text{'recs_addr'} : $text{'recs_name'})."</a>");
-push(@hcols, $text{'recs_type'}) if ($in{'type'} eq "ALL");
+push(@hcols, "<a href='edit_recs.cgi?index=$in{'index'}&view=$in{'view'}&type=$in{'type'}&sort=5'>$text{'recs_type'}</a>") if ($in{'type'} eq "ALL");
 push(@hcols, $text{'recs_ttl'});
 @hmap = @{$hmap{$in{'type'}}};
 foreach $h (@hmap) {
index fa1b82d..16a6c23 100755 (executable)
@@ -489,7 +489,11 @@ elsif ($s == 3) {
        }
 elsif ($s == 4) {
        # Sort by comment
-               return sort { $b->{'comment'} cmp $a->{'comment'} } @_;
+       return sort { $b->{'comment'} cmp $a->{'comment'} } @_;
+       }
+elsif ($s == 5) {
+       # Sort by type
+       return sort { $a->{'type'} cmp $b->{'type'} } @_;
        }
 else {
        return @_;