ispman/lib/ISPMan/DNSMan SOArecords.pm,1.22,1.23

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan/DNSMan
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv3519/lib/ISPMan/DNSMan

Modified Files:
	SOArecords.pm 
Log Message:
fixing bug with wrong serial updates from CLI
changed param of setDNSsOARecord to match getSOA


Index: SOArecords.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/DNSMan/SOArecords.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- SOArecords.pm	29 May 2006 22:24:55 -0000	1.22
+++ SOArecords.pm	30 May 2006 20:38:27 -0000	1.23
@@ -39,14 +39,11 @@
     my $self = shift;
     my $r    = shift;
     my $soa  = $self->getSOA( $r->param('ispmanDomain') );
-    $soa->{'serial'} = $self->updateSOASerial( $soa->{'serial'} );
 
-    $self->setDNSsOARecord(
-        $r->param("ispmanDomain"), $r->param('primary'),
-        $r->param('rootmail'),     $soa->{'serial'},
-        $r->param('refresh'),      $r->param('retry'),
-        $r->param('expire'),       $r->param('minimum')
-    );
+    foreach ( ('primary','rootmail','serial','refresh','retry','expire','minimum') ){
+        $soa->{$_} = $r->param($_);
+    }
+    $self->setDNSsOARecord( $r->param("ispmanDomain"), $soa );
 
     $self->editDNSsOARecords($r);
 }
@@ -54,9 +51,14 @@
 sub setDNSsOARecord {
     my $self   = shift;
     my $domain = shift;
-    my $soa    = join( " ", @_ );
+    my $soa    = shift;
+
+    $soa->{'serial'} = $self->updateSOASerial( $soa->{'serial'} );
     $self->delTree( $self->getsOARecordDn( $domain ) );
-    $self->newDNSRecord( $domain, "sOARecord", '@', $soa );
+    $self->newDNSRecord( $domain, "sOARecord", '@', join " ",
+       ($soa->{'primary'}, $soa->{'rootmail'}, $soa->{'serial'},
+        $soa->{'refresh'}, $soa->{'retry'},    $soa->{'expire'},
+        $soa->{'minimum'}));
 }
 
 sub getSOA {



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.