Changeset 899
- Timestamp:
- 11/29/16 16:43:32 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r893 r899 2247 2247 my @nbset = $pr->{cidr}->split($args{newmask}); 2248 2248 2249 # set up update ofexisting block2249 # update existing block 2250 2250 $dbh->do("UPDATE allocations SET cidr = ? WHERE id = ?", undef, ("$nbset[0]", $pr->{id}) ); 2251 2251 … … 2320 2320 2321 2321 if (%fbdel) { 2322 # pretty sure this SELECT result isn't used... 2322 2323 my $delfblist = $dbh->selectall_arrayref(q{ 2323 2324 SELECT cidr,parent_id,id FROM freeblocks 2324 2325 WHERE id in ( 2325 2326 }.join(',', keys %fbdel).")", {Slice=>{}} ); 2326 $dbh->do("DELETE FROM freeblocks WHERE id IN (".join(',', keys %fbdel).")") if %fbdel; 2327 foreach my $fbd (keys %fbdel) { 2328 $dbh->do("UPDATE freeblocks SET cidr = set_masklen(cidr, ?) WHERE id = ?", undef, $args{newmask}, $fbd); 2329 } 2327 2330 } 2328 2331
Note:
See TracChangeset
for help on using the changeset viewer.