Changeset 508 for branches/stable/cgi-bin/IPDB.pm
- Timestamp:
- 11/16/11 16:28:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/IPDB.pm
r445 r508 72 72 our $syslog_facility = 'local2'; 73 73 74 # Allow allocations to come from private IP ranges by default? 75 # Set to 'y' or 'on' to enable. 76 our $allowprivrange = ''; 77 74 78 # Let's initialize the globals. 75 79 ## IPDB::initIPDBGlobals() … … 312 316 sub allocateBlock { 313 317 my ($dbh,undef,undef,$custid,$type,$city,$desc,$notes,$circid,$privdata,$nodeid) = @_; 318 $privdata = '' if !defined($privdata); 314 319 315 320 my $cidr = new NetAddr::IP $_[1]; … … 399 404 $sth = $dbh->prepare("insert into allocations". 400 405 " (cidr,custid,type,city,description,notes,maskbits,circuitid,privdata)". 401 " values ('$cidr','$custid','$type','$city', '$desc','$notes',".402 $cidr->masklen.", '$circid','$privdata')");403 $sth->execute ;406 " values ('$cidr','$custid','$type','$city',?,?,". 407 $cidr->masklen.",?,?)"); 408 $sth->execute($desc,$notes,$circid,$privdata); 404 409 405 410 # And initialize the pool, if necessary … … 509 514 $sth = $dbh->prepare("insert into allocations (cidr,custid,type,city,". 510 515 "description,notes,maskbits,circuitid,privdata)". 511 " values ('$cidr','$custid','$type','$city', '$desc','$notes',".512 $cidr->masklen.", '$circid','$privdata')");513 $sth->execute ;516 " values ('$cidr','$custid','$type','$city',?,?,". 517 $cidr->masklen.",?,?)"); 518 $sth->execute($desc,$notes,$circid,$privdata); 514 519 515 520 # And initialize the pool, if necessary
Note:
See TracChangeset
for help on using the changeset viewer.