ispman/ispman-web/cgi-bin/tmpl/dns edit_Arecords.tmpl,1.13,1.14 edit_CNAMES.tmpl,1.11,1.12 edit_MXrecords.tmpl,1.11,1.12
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/dns
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2693/ispman-web/cgi-bin/tmpl/dns
Modified Files:
edit_Arecords.tmpl edit_CNAMES.tmpl edit_MXrecords.tmpl
Log Message:
fixes warning about "uninitialized value"
Index: edit_CNAMES.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/dns/edit_CNAMES.tmpl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- edit_CNAMES.tmpl 17 Jun 2003 16:07:43 -0000 1.11
+++ edit_CNAMES.tmpl 20 Jun 2004 11:46:20 -0000 1.12
@@ -15,19 +15,19 @@
<th><a href='$ENV{'SCRIPT_NAME'}?mode=editDNScNAMERecords&ispmanDomain=$thisDomain&sortby=host'>@{[_("Host")]}</a></th>
</tr>|;
-my $sortby=$r->param("sortby");
+my $sortby=$r->param("sortby") || "alias";
my @sorted=();
-if ($sortby eq 'host') {
- @sorted=sort {
- $a->{'host'} cmp $b->{'host'} ||
- $a->{'alias'} cmp $b->{'alias'}
- } @{$ispman->{'domain'}{'dns'}};
-} else {
+if ($ispman->{'domain'}{'dns'}){
+ if ($sortby eq 'host') {
+ @sorted=sort {
+ $a->{'host'} cmp $b->{'host'} || $a->{'alias'} cmp $b->{'alias'}
+ } @{$ispman->{'domain'}{'dns'}};
+ } else {
@sorted=sort {
- $a->{'alias'} cmp $b->{'alias'} ||
- $a->{'host'} cmp $b->{'host'}
- } @{$ispman->{'domain'}{'dns'}};
+ $a->{'alias'} cmp $b->{'alias'} || $a->{'host'} cmp $b->{'host'}
+ } @{$ispman->{'domain'}{'dns'}};
+ }
}
Index: edit_Arecords.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/dns/edit_Arecords.tmpl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- edit_Arecords.tmpl 17 Jun 2003 22:20:21 -0000 1.13
+++ edit_Arecords.tmpl 20 Jun 2004 11:46:20 -0000 1.14
@@ -35,25 +35,27 @@
</tr>
</form>|;
-my $sortby=$r->param("sortby");
+my $sortby=$r->param("sortby") || "host";
my @sorted=();
-if ($sortby eq 'ip') {
+if ($ispman->{'domain'}{'dns'}){
+ if ($sortby eq 'ip') {
@sorted=sort {
- my ($a1,$a2,$a3,$a4) = split (/\./, $a->{'ip'});
- my ($b1,$b2,$b3,$b4) = split (/\./, $b->{'ip'});
- $a1 <=> $b1 || $a2 <=> $b2 || $a3 <=> $b3 || $a4 <=> $b4 ||
+ my ($a1,$a2,$a3,$a4) = split (/\./, $a->{'ip'});
+ my ($b1,$b2,$b3,$b4) = split (/\./, $b->{'ip'});
+ $a1 <=> $b1 || $a2 <=> $b2 || $a3 <=> $b3 || $a4 <=> $b4 ||
$a->{'host'} cmp $b->{'host'};
- } @{$ispman->{'domain'}{'dns'}};
-} elsif ($sortby eq 'ptr') {
+ } @{$ispman->{'domain'}{'dns'}};
+ } elsif ($sortby eq 'ptr') {
@sorted=sort {
- $a->{'ptr'} cmp $b->{'ptr'} ||
+ $a->{'ptr'} cmp $b->{'ptr'} ||
$a->{'host'} cmp $b->{'host'}
- } @{$ispman->{'domain'}{'dns'}};
-} else {
+ } @{$ispman->{'domain'}{'dns'}};
+ } else {
@sorted=sort {
- $a->{'host'} cmp $b->{'host'}
- } @{$ispman->{'domain'}{'dns'}};
+ $a->{'host'} cmp $b->{'host'}
+ } @{$ispman->{'domain'}{'dns'}};
+ }
}
for (@sorted){
Index: edit_MXrecords.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/dns/edit_MXrecords.tmpl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- edit_MXrecords.tmpl 17 Jun 2003 16:07:43 -0000 1.11
+++ edit_MXrecords.tmpl 20 Jun 2004 11:46:20 -0000 1.12
@@ -15,27 +15,28 @@
<th><a href='$ENV{'SCRIPT_NAME'}?mode=editDNSmXRecords&ispmanDomain=$thisDomain&sortby=prio'>@{[_("Priority")]}</a></th>
</tr>|;
-my $sortby=$r->param("sortby");
+my $sortby=$r->param("sortby") || "origin";
my @sorted=();
-if ($sortby eq 'host') {
+if ($ispman->{'domain'}{'dns'}){
+ if ($sortby eq 'host') {
@sorted=sort {
- $a->{'host'} cmp $b->{'host'} ||
+ $a->{'host'} cmp $b->{'host'} ||
$a->{'origion'} cmp $b->{'origion'}
- } @{$ispman->{'domain'}{'dns'}};
-} elsif ($sortby eq 'prio') {
+ } @{$ispman->{'domain'}{'dns'}};
+ } elsif ($sortby eq 'prio') {
@sorted=sort {
- $a->{'pref'} <=> $b->{'pref'} ||
+ $a->{'pref'} <=> $b->{'pref'} ||
$a->{'origion'} cmp $b->{'origion'}
- } @{$ispman->{'domain'}{'dns'}};
-} else {
+ } @{$ispman->{'domain'}{'dns'}};
+ } else {
@sorted=sort {
- $a->{'origion'} cmp $b->{'origion'} ||
+ $a->{'origion'} cmp $b->{'origion'} ||
$a->{'pref'} <=> $b->{'pref'}
- } @{$ispman->{'domain'}{'dns'}};
+ } @{$ispman->{'domain'}{'dns'}};
+ }
}
-
for (@sorted){
$text.=qq|
<form method=POST name="mxModifyForm">
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND