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


Ignore:
Timestamp:
02/22/05 14:25:58 (19 years ago)
Author:
Kris Deugau
Message:

/trunk

New feature: Different "default" CustIDs depending on the allocation type
consistency-check.pl also updated to check this information.

File:
1 edited

Legend:

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

    r157 r167  
    2222@ISA            = qw(Exporter);
    2323@EXPORT_OK    = qw(
    24         %disp_alloctypes %list_alloctypes @citylist @poplist @masterblocks
     24        %disp_alloctypes %list_alloctypes %def_custids @citylist @poplist @masterblocks
    2525        %allocated %free %routed %bigfree
    2626        &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock &deleteBlock
     
    3030@EXPORT         = (); # Export nothing by default.
    3131%EXPORT_TAGS    = ( ALL => [qw(
    32                 %disp_alloctypes %list_alloctypes @citylist @poplist @masterblocks
    33                 %allocated %free %routed %bigfree
     32                %disp_alloctypes %list_alloctypes %def_custids @citylist @poplist
     33                @masterblocks %allocated %free %routed %bigfree
    3434                &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock
    3535                &deleteBlock &mailNotify
     
    4242our %disp_alloctypes;
    4343our %list_alloctypes;
     44our %def_custids;
    4445our @citylist;
    4546our @poplist;
     
    5859
    5960  # Initialize alloctypes hashes
    60   $sth = $dbh->prepare("select type,listname,dispname,listorder from alloctypes order by listorder");
     61  $sth = $dbh->prepare("select type,listname,dispname,listorder,def_custid from alloctypes order by listorder");
    6162  $sth->execute;
    6263  while (my @data = $sth->fetchrow_array) {
    6364    $disp_alloctypes{$data[0]} = $data[2];
     65    $def_custids{$data[0]} = $data[4];
    6466    if ($data[3] < 900) {
    6567      $list_alloctypes{$data[0]} = $data[1];
Note: See TracChangeset for help on using the changeset viewer.