Ignore:
Timestamp:
06/20/16 13:18:07 (9 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Merge /trunk through r721; minor tweaks and updates required for RPC
from IPDB

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

  • branches/stable/dns.cgi

    r690 r725  
    2525use CGI::Simple;
    2626use HTML::Template;
    27 use CGI::Session;
     27use CGI::Session '-ip_match';
    2828use Net::DNS;
    2929use DBI;
     
    158158}
    159159if (defined($webvar{filter})) {
     160  $session->param($webvar{page}.'filter', '') if !$session->param($webvar{page}.'filter');
    160161  if ($webvar{filter} ne $session->param($webvar{page}.'filter')) {
    161162    $uri_self =~ s/\&offset=[^&]//;
     
    528529
    529530  fill_grouplist("grouplist");
    530   my $loclist = $dnsdb->getLocDropdown($curgroup);
    531   $page->param(loclist => $loclist);
     531  fill_loclist($curgroup, $webvar{defloc} ? $webvar{defloc} : '');
    532532
    533533  # prepopulate revpatt with the matching default record
     
    15251525        unless ($permissions{admin} || $permissions{location_create});
    15261526
    1527     my ($code,$msg) = $dnsdb->addLoc($curgroup, $webvar{locname}, $webvar{comments}, $webvar{iplist});
     1527    my ($code,$msg) = $dnsdb->addLoc(group => $curgroup, desc => $webvar{locname},
     1528        comments => $webvar{comments}, iplist => $webvar{iplist});
    15281529
    15291530    if ($code eq 'OK' || $code eq 'WARN') {
     
    16211622} elsif ($webvar{page} eq 'dnsq') {
    16221623
    1623   $page->param(qfor => $webvar{qfor}) if $webvar{qfor};
     1624  if ($webvar{qfor}) {
     1625    $webvar{qfor} =~ s/^\s*//;
     1626    $webvar{qfor} =~ s/\s*$//;
     1627    $page->param(qfor => $webvar{qfor});
     1628  }
     1629  if ($webvar{resolver}) {
     1630    $webvar{resolver} =~ s/^\s*//;
     1631    $webvar{resolver} =~ s/\s*$//;
     1632    $page->param(resolver => $webvar{resolver});
     1633  }
    16241634  $page->param(typelist => $dnsdb->getTypelist('l', ($webvar{type} ? $webvar{type} : undef)));
    16251635  $page->param(nrecurse => $webvar{nrecurse}) if $webvar{nrecurse};
    1626   $page->param(resolver => $webvar{resolver}) if $webvar{resolver};
    16271636
    16281637  if ($webvar{qfor}) {
Note: See TracChangeset for help on using the changeset viewer.