Changeset 519 for trunk/cgi-bin/IPDB.pm


Ignore:
Timestamp:
10/19/12 16:15:59 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Move SQL for node search page into IPDB.pm. See #34.
Also tweak some handling for the lingering global statement handle
variable, since it may be undefined instead of a statement handle.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r518 r519  
    2626        %allocated %free %routed %bigfree %IPDBacl %aclmsg
    2727        &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock &addMaster
    28         &deleteBlock &getBlockData &mailNotify
     28        &deleteBlock &getBlockData
     29        &getNodeList
     30        &mailNotify
    2931        );
    3032
     
    3436                @masterblocks %allocated %free %routed %bigfree %IPDBacl %aclmsg
    3537                &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock
    36                 &addMaster &deleteBlock &getBlockData &mailNotify
     38                &addMaster &deleteBlock &getBlockData
     39                &getNodeList
     40                &mailNotify
    3741                )]
    3842        );
     
    832836
    833837
     838## IPDB::getNodeList()
     839# Gets a list of node ID+name pairs as an arrayref to a list of hashrefs
     840sub getNodeList {
     841  my $dbh = shift;
     842 
     843  my $ret = $dbh->selectall_arrayref("SELECT node_id, node_name FROM nodes ORDER BY node_type,node_id",
     844        { Slice => {} });
     845  return $ret;
     846} # end getNodeList()
     847
     848
    834849## IPDB::mailNotify()
    835850# Sends notification mail to recipients regarding an IPDB operation
Note: See TracChangeset for help on using the changeset viewer.