Changeset 480 for trunk/dns.cgi


Ignore:
Timestamp:
03/13/13 17:57:03 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

Object conversion of DNSDB.pm, 13 of <mumble>. See #11.

  • location add/update/delete/retrieve in addLoc(), updateLoc(), delLoc(), getLoc(), getLocCount(), getLocList(), and getLocDropdown() and callers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r479 r480  
    439439
    440440  fill_grouplist("grouplist");
    441   my $loclist = getLocDropdown($dbh, $curgroup);
     441  my $loclist = $dnsdb->getLocDropdown($curgroup);
    442442  $page->param(loclist => $loclist);
    443443
     
    13631363        unless ($permissions{admin} || $permissions{location_create});
    13641364
    1365     my ($code,$msg) = addLoc($dbh, $curgroup, $webvar{locname}, $webvar{comments}, $webvar{iplist});
     1365    my ($code,$msg) = $dnsdb->addLoc($curgroup, $webvar{locname}, $webvar{comments}, $webvar{iplist});
    13661366
    13671367    if ($code eq 'OK' || $code eq 'WARN') {
     
    13871387        unless ($permissions{admin} || $permissions{location_edit});
    13881388
    1389     my $loc = getLoc($dbh, $webvar{loc});
     1389    my $loc = $dnsdb->getLoc($webvar{loc});
    13901390    $page->param(wastrying      => "editing");
    13911391    $page->param(todo           => "Edit location/view");
     
    14001400        unless ($permissions{admin} || $permissions{location_edit});
    14011401
    1402     my ($code,$msg) = updateLoc($dbh, $webvar{id}, $curgroup, $webvar{locname}, $webvar{comments}, $webvar{iplist});
     1402    my ($code,$msg) = $dnsdb->updateLoc($webvar{id}, $curgroup, $webvar{locname}, $webvar{comments}, $webvar{iplist});
    14031403
    14041404    if ($code eq 'OK') {
     
    14381438
    14391439  $page->param(locid => $webvar{locid});
    1440   my $locdata = getLoc($dbh, $webvar{locid});
     1440  my $locdata = $dnsdb->getLoc($webvar{locid});
    14411441  $locdata->{description} = $webvar{locid} if !$locdata->{description};
    14421442  # first pass = confirm y/n (sorta)
     
    14451445    $page->param(location => $locdata->{description});
    14461446  } elsif ($webvar{del} eq 'ok') {
    1447     my ($code,$msg) = delLoc($dbh, $webvar{locid});
     1447    my ($code,$msg) = $dnsdb->delLoc($webvar{locid});
    14481448    if ($code eq 'OK') {
    14491449      # success.  go back to the user list, do not pass "GO"
     
    21742174
    21752175  if ($permissions{admin} || $permissions{record_locchg}) {
    2176     my $loclist = getLocDropdown($dbh, $cur, $defloc);
     2176    my $loclist = $dnsdb->getLocDropdown($cur, $defloc);
    21772177    $page->param(record_locchg => 1);
    21782178    $page->param(loclist => $loclist);
    21792179  } else {
    2180     my $loc = getLoc($dbh, $defloc);
     2180    my $loc = $dnsdb->getLoc($defloc);
    21812181    $page->param(loc_name => $loc->{description});
    21822182  }
     
    22372237  my $childlist = join(',',@childgroups);
    22382238
    2239   my $count = getLocCount($dbh, (childlist => $childlist, curgroup => $curgroup,
    2240         filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef) ) );
     2239  my $count = $dnsdb->getLocCount(childlist => $childlist, curgroup => $curgroup,
     2240        filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef) );
    22412241
    22422242# fill page count and first-previous-next-last-all bits
     
    22632263  $page->param(searchsubs => $searchsubs) if $searchsubs;
    22642264
    2265   my $loclist = getLocList($dbh, (childlist => $childlist, curgroup => $curgroup,
     2265  my $loclist = $dnsdb->getLocList(childlist => $childlist, curgroup => $curgroup,
    22662266        filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef),
    2267         offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder) );
     2267        offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder);
    22682268  # Some UI things need to be done to the list
    22692269  foreach my $l (@{$loclist}) {
Note: See TracChangeset for help on using the changeset viewer.