Changeset 437 for branches/stable


Ignore:
Timestamp:
10/30/12 12:23:30 (12 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Backport AXFR fix/enhancement from /trunk r436. Merged but all
three files conflicted (expected).

Location:
branches/stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

    • Property svn:mergeinfo changed
      /trunkmerged: 436
  • branches/stable/DNSDB.pm

    r434 r437  
    17441744  my $domain = shift;
    17451745  my $group = shift;
    1746   my $status = shift || 1;
     1746  my $status = shift;
     1747  $status = (defined($status) ? $status : 0);   # force sane semantics, and allow passing "null" (inactive) status
    17471748  my $rwsoa = shift || 0;
    17481749  my $rwns = shift || 0;
     1750  my $newttl = shift;
    17491751
    17501752##fixme:  add mode to delete&replace, merge+overwrite, merge new?
     
    18011803    while (my $rr = $res->axfr_next()) {
    18021804      my $type = $rr->type;
     1805      my $ttl = ($newttl ? $newttl : $rr->ttl); # allow force-override TTLs
    18031806
    18041807      my $sql = "INSERT INTO records (domain_id,host,type,ttl,val";
  • branches/stable/dns.cgi

    r432 r437  
    14621462  $page->param(rwsoa => $webvar{rwsoa}) if $webvar{rwsoa};
    14631463  $page->param(rwns => $webvar{rwns}) if $webvar{rwns};
     1464  $page->param(forcettl => $webvar{forcettl}) if $webvar{forcettl};
     1465  $page->param(newttl => $webvar{newttl}) if $webvar{newttl};
    14641466  $page->param(dominactive => 1) if (!$webvar{domactive} && $webvar{doit});     # eww.
    14651467  $page->param(importdoms => $webvar{importdoms}) if $webvar{importdoms};
     
    14851487      my %row;
    14861488      my ($code,$msg) = importAXFR($dbh, $webvar{ifrom}, $domain, $webvar{group},
    1487         $webvar{domstatus}, $webvar{rwsoa}, $webvar{rwns});
     1489        $webvar{domstatus}, $webvar{rwsoa}, $webvar{rwns}, ($webvar{forcettl});
    14881490      $row{domok} = $msg if $code eq 'OK';
    14891491      if ($code eq 'WARN') {
  • branches/stable/templates/axfr.tmpl

    r38 r437  
    3333        <td>Rewrite NS to group default?</td>
    3434        <td><input type="checkbox" name="rwns"<TMPL_IF rwns> checked="checked"</TMPL_IF> /></td>
     35</tr>
     36<tr class="datalinelight">
     37        <td>Force all TTLs to new value?</td>
     38        <td><input type="checkbox" name="forcettl"<TMPL_IF forcettl> checked="checked"</TMPL_IF> /><input name="newttl" size="7"<TMPL_IF newttl> value="<TMPL_VAR NAME=newttl>"</TMPL_IF> /></td>
    3539</tr>
    3640<tr class="datalinelight">
Note: See TracChangeset for help on using the changeset viewer.