CVS: ispman/lib/ISPMan/DNSMan SOArecords.pm,1.15,1.16

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-cvs1:/tmp/cvs-serv23200/lib/ISPMan/DNSMan

Modified Files:
	SOArecords.pm 
Log Message:
rollback of HEAD to REL_1_0 versions
former HEAD development will continue in "experimental-branch" and merged back here
(more info on ispman-developer maillist and upcoming README.cvs in HEAD)


Index: SOArecords.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/DNSMan/SOArecords.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** SOArecords.pm	2 Jan 2004 14:34:00 -0000	1.15
--- SOArecords.pm	4 Jan 2004 18:56:15 -0000	1.16
***************
*** 13,17 ****
     touchSOA
     setDNSsOARecord
-    updateSOASerial
  );
  $VERSION = '0.01';
--- 13,16 ----
***************
*** 44,54 ****
     my $self=shift;
     my $r=shift;
!    my $soa=$self->getSOA($r->param('ispmanDomain'));
!       $soa->{'serial'} = $self->updateSOASerial($soa->{'serial'});
!       
     $self->delTree($self->getsOARecordDn($r->param("ispmanDomain")));
     $self->setDNSsOARecord($r->param("ispmanDomain"),       $r->param('primary'),
        $r->param('rootmail'),
!       $soa->{'serial'},
        $r->param('refresh'),
        $r->param('retry'),
--- 43,51 ----
     my $self=shift;
     my $r=shift;
!    
     $self->delTree($self->getsOARecordDn($r->param("ispmanDomain")));
     $self->setDNSsOARecord($r->param("ispmanDomain"),       $r->param('primary'),
        $r->param('rootmail'),
!       time(),
        $r->param('refresh'),
        $r->param('retry'),
***************
*** 93,103 ****
     my $soa=$self->getSOA($domain);
  
-    $soa->{'serial'} = $self->updateSOASerial($soa->{'serial'});
-   
     $self->delTree($self->getsOARecordDn($domain));
     $self->setDNSsOARecord($domain,
          $soa->{'primary'},
          $soa->{'rootmail'},
!         $soa->{'serial'},
          $soa->{'refresh'},
          $soa->{'retry'},
--- 90,98 ----
     my $soa=$self->getSOA($domain);
  
     $self->delTree($self->getsOARecordDn($domain));
     $self->setDNSsOARecord($domain,
          $soa->{'primary'},
          $soa->{'rootmail'},
!         time(),
          $soa->{'refresh'},
          $soa->{'retry'},
***************
*** 116,151 ****
  }
  
- # updateSOASerial - generates the correct serial for the record.
- # correct format: YYYYMMDDnn
- sub updateSOASerial {
-     my $self=shift;
-     my $serial=shift;
-     
-     if ($self->{'Config'}->{'DNSSerialFormat'} eq 'timestamp') {
-         return time();
-     }
-     
-     my @localtime = localtime();
-     my $year = $localtime[5] + 1900;
-     my $month = $localtime[4] + 1;
-     my $day = $localtime[3] ;
-  
-     my $index = substr($serial,-2,2);
-     my $olddate  = substr($serial,0,8);
-     
-     $day    = "0$day"   if ($day < 10);
-     $month  = "0$month" if ($month < 10);
-     
-     my $newdate = $year.$month.$day;
-     
-     if ($olddate ne $newdate) {
-         $serial = $newdate."01";
-     } elsif ($olddate == $newdate) {
-         $index++;
-         $serial = $olddate . $index;
-     }
-     
-     return $serial;
- }
  
  1;
--- 111,114 ----



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
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.