Ignore:
Timestamp:
05/14/13 17:45:17 (11 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Merge /trunk changes up to r516

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

  • branches/stable/cgi-bin/IPDB.pm

    r550 r592  
    321321  my $alloc_from = new NetAddr::IP $_[2];
    322322  my $sth;
     323
     324  $desc = '' if !$desc;
     325  $notes = '' if !$notes;
     326  $circid = '' if !$circid;
     327  $privdata = '' if !$privdata;
    323328
    324329  # Snag the "type" of the freeblock (alloc_from) "just in case"
     
    591596    # have to insert all pool IPs into poolips table as "unallocated".
    592597    $sth = $dbh->prepare("insert into poolips (pool,ip,custid,city,type)".
    593         " values ('$pool', ?, '$defcustid', '$city', '$type')");
     598        " values ('$pool', ?, '$defcustid', ?, '$type')");
    594599    my @poolip_list = $pool->hostenum;
    595600    if ($class eq 'all') { # (DSL-ish block - *all* IPs available
    596601      if ($pool->addr !~ /\.0$/) {      # .0 causes weirdness.
    597         $sth->execute($pool->addr);
     602        $sth->execute($pool->addr, $city);
    598603      }
    599604      for (my $i=0; $i<=$#poolip_list; $i++) {
    600         $sth->execute($poolip_list[$i]->addr);
     605        $sth->execute($poolip_list[$i]->addr, $city);
    601606      }
    602607      $pool--;
    603608      if ($pool->addr !~ /\.255$/) {    # .255 can cause weirdness.
    604         $sth->execute($pool->addr);
     609        $sth->execute($pool->addr, $city);
    605610      }
    606611    } else { # (real netblock)
    607612      for (my $i=1; $i<=$#poolip_list; $i++) {
    608         $sth->execute($poolip_list[$i]->addr);
     613        $sth->execute($poolip_list[$i]->addr, $city);
    609614      }
    610615    }
    611616  };
    612617  if ($@) {
    613     $msg = "'".$sth->errstr."'";
     618    $msg = $@." '".$sth->errstr."'";
    614619    eval { $dbh->rollback; };
    615620    return ('FAIL',$msg);
     
    847852  my ($action,$subj,$message) = @_;
    848853
    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.
    850855
    851856##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.