Changeset 476 for trunk/dns.cgi


Ignore:
Timestamp:
03/13/13 13:20:50 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

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

  • group manipulation and data-retrieval subs changeGroup(), addGroup(), delGroup(), getChildren(), getGroupCount(), and getGroupList()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r474 r476  
    874874    # https://secure.deepnet.cx/trac/dnsadmin/ticket/8 for the UI enhancement
    875875    # that will make this variable.
    876     my ($code,$msg) = addGroup($dbh, $webvar{newgroup}, $webvar{pargroup}, \%newperms, 1);
     876    my ($code,$msg) = $dnsdb->addGroup($webvar{newgroup}, $webvar{pargroup}, \%newperms, 1);
    877877    if ($code eq 'OK') {
    878878      if ($alterperms) {
     
    917917
    918918  } elsif ($webvar{del} eq 'ok') {
    919     my ($code,$msg) = delGroup($dbh, $webvar{id});
     919    my ($code,$msg) = $dnsdb->delGroup($webvar{id});
    920920    if ($code eq 'OK') {
    921921##fixme: need to clean up log when deleting a major container
     
    10601060    # Do the $webvar{bulkaction}
    10611061    my ($code, $msg);
    1062     ($code, $msg) = changeGroup($dbh, 'domain', $webvar{$_}, $webvar{destgroup})
     1062    ($code, $msg) = $dnsdb->changeGroup('domain', $webvar{$_}, $webvar{destgroup})
    10631063        if $webvar{bulkaction} eq 'move';
    10641064    if ($webvar{bulkaction} eq 'deactivate' || $webvar{bulkaction} eq 'activate') {
     
    17661766
    17671767  my $grptree = HTML::Template->new(filename => 'templates/grptree.tmpl');
    1768   getChildren($dbh,$root,\@childlist,'immediate');
     1768  $dnsdb->getChildren($root, \@childlist, 'immediate');
    17691769  return if $#childlist == -1;
    17701770  my @grouplist;
     
    20322032
    20332033  my @childgroups;
    2034   getChildren($dbh, $curgroup, \@childgroups, 'all') if $searchsubs;
     2034  $dnsdb->getChildren($curgroup, \@childgroups, 'all') if $searchsubs;
    20352035  my $childlist = join(',',@childgroups);
    20362036
     
    20902090
    20912091  my @childgroups;
    2092   getChildren($dbh, $curgroup, \@childgroups, 'all') if $searchsubs;
     2092  $dnsdb->getChildren($curgroup, \@childgroups, 'all') if $searchsubs;
    20932093  my $childlist = join(',',@childgroups);
    20942094
    2095   my ($count) = getGroupCount($dbh, (childlist => $childlist, curgroup => $curgroup,
    2096         filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef) ) );
     2095  my ($count) = $dnsdb->getGroupCount(childlist => $childlist, curgroup => $curgroup,
     2096        filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef) );
    20972097
    20982098# fill page count and first-previous-next-last-all bits
     
    21252125  $sortby = 'g2.group_name' if $sortby eq 'parent';
    21262126
    2127   my $glist = getGroupList($dbh, (childlist => $childlist, curgroup => $curgroup,
     2127  my $glist = $dnsdb->getGroupList(childlist => $childlist, curgroup => $curgroup,
    21282128        filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef),
    2129         offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder) );
     2129        offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder);
    21302130
    21312131  $page->param(grouptable => $glist);
     
    21452145
    21462146    my @childlist;
    2147     getChildren($dbh,$root,\@childlist,'immediate');
     2147    $dnsdb->getChildren($root, \@childlist, 'immediate');
    21482148    return if $#childlist == -1;
    21492149    foreach (@childlist) {
     
    21882188
    21892189  my @childgroups;
    2190   getChildren($dbh, $curgroup, \@childgroups, 'all') if $searchsubs;
     2190  $dnsdb->getChildren($curgroup, \@childgroups, 'all') if $searchsubs;
    21912191  my $childlist = join(',',@childgroups);
    21922192
     
    22352235
    22362236  my @childgroups;
    2237   getChildren($dbh, $curgroup, \@childgroups, 'all') if $searchsubs;
     2237  $dnsdb->getChildren($curgroup, \@childgroups, 'all') if $searchsubs;
    22382238  my $childlist = join(',',@childgroups);
    22392239
Note: See TracChangeset for help on using the changeset viewer.