Changeset 326 for trunk/dns.cgi


Ignore:
Timestamp:
05/02/12 17:41:48 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Move SQL for clone-this-user dropdown into DNSDB.pm. See #1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r325 r326  
    18281828
    18291829sub fill_clonemelist {
    1830   my $sth = $dbh->prepare("SELECT username,user_id FROM users WHERE group_id=$curgroup");
    1831   $sth->execute;
    1832 
    18331830  # shut up some warnings, but don't stomp on caller's state
    18341831  local $webvar{clonesrc} = 0 if !defined($webvar{clonesrc});
    18351832
    1836   my @clonesrc;
    1837   while (my ($username,$uid) = $sth->fetchrow_array) {
    1838     my %row = (
    1839         username => $username,
    1840         uid => $uid,
    1841         selected => ($webvar{clonesrc} == $uid ? 1 : 0)
    1842         );
    1843     push @clonesrc, \%row;
    1844   }
    1845   $page->param(clonesrc => \@clonesrc);
     1833  my $clones = getUserDropdown($dbh, $curgroup, $webvar{clonesrc});
     1834  $page->param(clonesrc => $clones);
    18461835}
    18471836
Note: See TracChangeset for help on using the changeset viewer.