Ignore:
Timestamp:
09/23/05 15:54:31 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Merge changes from /trunk revisions:

234
237
254 (ipdb.css only)
261
279
284
285

This merges the new search system (234, 237, 254), cleans up
some display CSS (254, 279), cleans up some leftover code (r261),
and merges the "private data" code (284, 285 - note SWIP hacks conflict).

/trunk should now be almost identical to /branches/stable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/IPDB.pm

    r250 r286  
    184184# Does all of the magic of actually allocating a netblock
    185185# Requires database handle, block to allocate, custid, type, city,
    186 #       description, notes, circuit ID, block to allocate from,
     186#       description, notes, circuit ID, block to allocate from, private data
    187187# Returns a success code and optional error message.
    188188sub allocateBlock {
    189   my ($dbh,undef,undef,$custid,$type,$city,$desc,$notes,$circid) = @_;
    190  
     189  my ($dbh,undef,undef,$custid,$type,$city,$desc,$notes,$circid,$privdata) = @_;
     190
    191191  my $cidr = new NetAddr::IP $_[1];
    192192  my $alloc_from = new NetAddr::IP $_[2];
     
    220220      $sth = $dbh->prepare("update poolips set custid='$custid',".
    221221        "city='$city',available='n',description='$desc',notes='$notes',".
    222         "circuitid='$circid'".
     222        "circuitid='$circid',privdata='$privdata'".
    223223        " where ip='$cidr'");
    224224      $sth->execute;
     
    263263          }
    264264          $sth = $dbh->prepare("insert into allocations".
    265                 " (cidr,custid,type,city,description,notes,maskbits,circuitid)".
     265                " (cidr,custid,type,city,description,notes,maskbits,circuitid,privdata)".
    266266                " values ('$cidr','$custid','$type','$city','$desc','$notes',".
    267                 $cidr->masklen.",'$circid')");
     267                $cidr->masklen.",'$circid','$privdata')");
    268268          $sth->execute;
    269269
     
    361361          # Insert the allocations entry
    362362          $sth = $dbh->prepare("insert into allocations (cidr,custid,type,city,".
    363                 "description,notes,maskbits,circuitid)".
     363                "description,notes,maskbits,circuitid,privdata)".
    364364                " values ('$cidr','$custid','$type','$city','$desc','$notes',".
    365                 $cidr->masklen.",'$circid')");
     365                $cidr->masklen.",'$circid','$privdata')");
    366366          $sth->execute;
    367367
Note: See TracChangeset for help on using the changeset viewer.