Changeset 592 for branches/stable/cgi-bin/IPDB.pm
- Timestamp:
- 05/14/13 17:45:17 (11 years ago)
- Location:
- branches/stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable
- Property svn:mergeinfo changed
/trunk merged: 452-455,462,485-486,515
- Property svn:mergeinfo changed
-
branches/stable/cgi-bin/IPDB.pm
r550 r592 321 321 my $alloc_from = new NetAddr::IP $_[2]; 322 322 my $sth; 323 324 $desc = '' if !$desc; 325 $notes = '' if !$notes; 326 $circid = '' if !$circid; 327 $privdata = '' if !$privdata; 323 328 324 329 # Snag the "type" of the freeblock (alloc_from) "just in case" … … 591 596 # have to insert all pool IPs into poolips table as "unallocated". 592 597 $sth = $dbh->prepare("insert into poolips (pool,ip,custid,city,type)". 593 " values ('$pool', ?, '$defcustid', '$city', '$type')");598 " values ('$pool', ?, '$defcustid', ?, '$type')"); 594 599 my @poolip_list = $pool->hostenum; 595 600 if ($class eq 'all') { # (DSL-ish block - *all* IPs available 596 601 if ($pool->addr !~ /\.0$/) { # .0 causes weirdness. 597 $sth->execute($pool->addr );602 $sth->execute($pool->addr, $city); 598 603 } 599 604 for (my $i=0; $i<=$#poolip_list; $i++) { 600 $sth->execute($poolip_list[$i]->addr );605 $sth->execute($poolip_list[$i]->addr, $city); 601 606 } 602 607 $pool--; 603 608 if ($pool->addr !~ /\.255$/) { # .255 can cause weirdness. 604 $sth->execute($pool->addr );609 $sth->execute($pool->addr, $city); 605 610 } 606 611 } else { # (real netblock) 607 612 for (my $i=1; $i<=$#poolip_list; $i++) { 608 $sth->execute($poolip_list[$i]->addr );613 $sth->execute($poolip_list[$i]->addr, $city); 609 614 } 610 615 } 611 616 }; 612 617 if ($@) { 613 $msg = "'".$sth->errstr."'";618 $msg = $@." '".$sth->errstr."'"; 614 619 eval { $dbh->rollback; }; 615 620 return ('FAIL',$msg); … … 847 852 my ($action,$subj,$message) = @_; 848 853 849 return if $ domain eq 'example.com'; # no point being obnoxious if we're still stuck with defaults.854 return if $smtphost eq 'smtp.example.com'; # do nothing if still using default SMTP host. 850 855 851 856 ##fixme: need to redesign the breakdown/processing for $action for proper handling of all cases
Note:
See TracChangeset
for help on using the changeset viewer.