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


Ignore:
Timestamp:
09/21/05 16:30:31 (19 years ago)
Author:
Kris Deugau
Message:

/trunk

Merge /branches/privdata r278:283 (with notable exception of
281, already committed to trunk) to /trunk
Merge is clean.

File:
1 edited

Legend:

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

    r256 r284  
    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.