Changeset 907 for trunk/DNSDB.pm


Ignore:
Timestamp:
08/11/25 17:28:21 (8 hours ago)
Author:
Kris Deugau
Message:

/trunk

A bundle of small ad hoc patches from my workspace:

  • Trivial docucomment tweak
  • Call the right DBI statement handle sub to return the record ID in addRec()
  • Sort domain records by IP value in export_tiny() so potential zingle-zone export sorts template records the same way as reverse zone export does
  • Trivial syntax niggle
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r902 r907  
    19631963  my $tmpl = shift;
    19641964  my $ip = shift;
    1965   my $subnet = shift;   # %ngb, %c, and %x
     1965  my $subnet = shift;   # for %ngb, %c, and %x
    19661966  my $ipindex = shift;  # for %c
    19671967
     
    48714871  my $retid;
    48724872  eval {
    4873     ($retid) = $dbh->selectrow("INSERT INTO "._rectable($defrec, $revrec)." ($fields) VALUES ($vallen) RETURNING record_id",
     4873    ($retid) = $dbh->selectrow_array("INSERT INTO "._rectable($defrec, $revrec)." ($fields) VALUES ($vallen) RETURNING record_id",
    48744874        undef,
    48754875        @vallist
     
    65646564        "FROM records WHERE domain_id=? AND type=6");
    65656565  $recsth = $dbh->prepare("SELECT host,type,val,distance,weight,port,ttl,record_id,location,extract(epoch from stamp),expires,stampactive ".
    6566         "FROM records WHERE domain_id=? AND NOT type=6");       # Just exclude all types relating to rDNS
     6566        "FROM records WHERE domain_id=? AND NOT type=6").       # Just exclude all types relating to rDNS
     6567        "ORDER BY masklen(inetlazy(val)) DESC, inetlazy(val)");
    65676568#       "FROM records WHERE domain_id=? AND type < 65280");     # Just exclude all types relating to rDNS
    65686569  my $domsth = $dbh->prepare("SELECT domain_id,domain,status,changed FROM domains WHERE status=1 ORDER BY domain_id");
     
    69256926      } else {
    69266927        # call sub to convert 1-4 hex digits to 2 string-rep octal bytes
    6927         $altconv[$altgrp++] = octalize($_)
     6928        $altconv[$altgrp++] = octalize($_);
    69286929      }
    69296930    }
Note: See TracChangeset for help on using the changeset viewer.