- Timestamp:
- 05/07/13 11:00:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r497 r501 2009 2009 my ($domid) = $dbh->selectrow_array("SELECT domain_id FROM domains WHERE lower(domain) = lower(?)", 2010 2010 undef, ($domain) ); 2011 $errstr = $DBI::errstr if !$domid; 2011 if (!$domid) { 2012 if ($dbh->err) { 2013 $errstr = $DBI::errstr; 2014 } else { 2015 $errstr = "Domain $domain not present"; 2016 } 2017 } 2012 2018 return $domid if $domid; 2013 2019 } # end domainID() … … 2023 2029 my $revzone = shift; 2024 2030 my ($revid) = $dbh->selectrow_array("SELECT rdns_id FROM revzones WHERE revnet=?", undef, ($revzone) ); 2025 $errstr = $DBI::errstr if !$revid; 2031 if (!$revid) { 2032 if ($dbh->err) { 2033 $errstr = $DBI::errstr; 2034 } else { 2035 $errstr = "Reverse zone $revzone not present"; 2036 } 2037 } 2026 2038 return $revid if $revid; 2027 2039 } # end revID() … … 3487 3499 $args{sortby} = 'val' if !$args{sortby} && $args{revrec} eq 'y'; # default sort by IP on revzone record list 3488 3500 $args{offset} = 0 if !$args{offset} || $args{offset} !~ /^(?:all|\d+)$/; 3501 my $perpage = ($args{nrecs} ? $args{nrecs} : $config{perpage}); 3489 3502 3490 3503 # sort reverse zones on IP, correctly … … 3513 3526 # ensure consistent ordering by sorting on record_id too 3514 3527 $sql .= ", record_id $args{sortorder}"; 3515 $sql .= ($args{offset} eq 'all' ? '' : " LIMIT $ config{perpage} OFFSET ".$args{offset}*$config{perpage});3528 $sql .= ($args{offset} eq 'all' ? '' : " LIMIT $perpage OFFSET ".$args{offset}*$perpage); 3516 3529 3517 3530 my @bindvars = ($args{id});
Note:
See TracChangeset
for help on using the changeset viewer.