Changeset 479 for trunk/dns.cgi


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

/trunk

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

  • user subs addUser(), getUserCount(), getUserList(), getUserDropdown(), updateUser(), delUser(), userStatus(), and getUserData() and callers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r477 r479  
    10961096    if ($flag && ($permissions{admin} || $permissions{user_edit} ||
    10971097        ($permissions{self_edit} && $webvar{id} == $session->param('uid')) )) {
    1098       my $stat = userStatus($dbh,$webvar{id},$webvar{userstatus});
     1098      my $stat = $dnsdb->userStatus($webvar{id}, $webvar{userstatus});
    10991099      $page->param(resultmsg => $DNSDB::resultstr);
    11001100    } else {
     
    11991199                unless $permissions{admin} || $permissions{user_create};
    12001200        # no scope check;  user is created in the current group
    1201         ($code,$msg) = addUser($dbh, $webvar{uname}, $curgroup, $webvar{pass1},
     1201        ($code,$msg) = $dnsdb->addUser($webvar{uname}, $curgroup, $webvar{pass1},
    12021202                ($webvar{makeactive} eq 'on' ? 1 : 0), $webvar{accttype}, $permstring,
    12031203                $webvar{fname}, $webvar{lname}, $webvar{phone});
     
    12141214# or self-torture trying to not commit the transaction until we're really done.
    12151215        # Allowing for changing group, but not coding web support just yet.
    1216         ($code,$msg) = updateUser($dbh, $webvar{uid}, $webvar{uname}, $webvar{gid}, $webvar{pass1},
     1216        ($code,$msg) = $dnsdb->updateUser($webvar{uid}, $webvar{uname}, $webvar{gid}, $webvar{pass1},
    12171217                ($webvar{makeactive} eq 'on' ? 1 : 0), $webvar{accttype},
    12181218                $webvar{fname}, $webvar{lname}, $webvar{phone});
     
    12751275    fill_clonemelist();
    12761276
    1277     my $userinfo = getUserData($dbh,$webvar{user});
     1277    my $userinfo = $dnsdb->getUserData($webvar{user});
    12781278    fill_actypelist($userinfo->{type});
    12791279    # not using this yet, but adding it now means we can *much* more easily do so later.
     
    13191319    $page->param(user => $dnsdb->userFullName($webvar{id}));
    13201320  } elsif ($webvar{del} eq 'ok') {
    1321     my ($code,$msg) = delUser($dbh, $webvar{id});
     1321    my ($code,$msg) = $dnsdb->delUser($webvar{id});
    13221322    if ($code eq 'OK') {
    13231323      # success.  go back to the user list, do not pass "GO"
     
    19651965  local $webvar{clonesrc} = 0 if !defined($webvar{clonesrc});
    19661966
    1967   my $clones = getUserDropdown($dbh, $curgroup, $webvar{clonesrc});
     1967  my $clones = $dnsdb->getUserDropdown($curgroup, $webvar{clonesrc});
    19681968  $page->param(clonesrc => $clones);
    19691969}
     
    21902190  my $childlist = join(',',@childgroups);
    21912191
    2192   my $count = getUserCount($dbh, (childlist => $childlist, curgroup => $curgroup,
    2193         filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef) ) );
     2192  my $count = $dnsdb->getUserCount(childlist => $childlist, curgroup => $curgroup,
     2193        filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef) );
    21942194
    21952195# fill page count and first-previous-next-last-all bits
     
    22162216  $page->param(searchsubs => $searchsubs) if $searchsubs;
    22172217
    2218   my $ulist = getUserList($dbh, (childlist => $childlist, curgroup => $curgroup,
     2218  my $ulist = $dnsdb->getUserList(childlist => $childlist, curgroup => $curgroup,
    22192219        filter => ($filter ? $filter : undef), startwith => ($startwith ? $startwith : undef),
    2220         offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder) );
     2220        offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder);
    22212221  # Some UI things need to be done to the list (unlike other lists)
    22222222  foreach my $u (@{$ulist}) {
Note: See TracChangeset for help on using the changeset viewer.