Changeset 590
- Timestamp:
- 01/22/13 17:31:53 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r588 r590 1032 1032 } # end fullcidr != alloc_from 1033 1033 1034 # now we do the DNS dance for netblocks, if we have an RPC server to do it with. 1035 _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user}); 1034 # now we do the DNS dance for netblocks, if we have an RPC server to do it with and a pattern to use. 1035 _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user}) 1036 if $args{rdns}; 1036 1037 1037 1038 return ('OK', 'OK'); … … 1184 1185 # Also handles "deleting" a static IP allocation, and removal of a master 1185 1186 # Requires a database handle, the block to delete, the routing depth (if applicable), 1186 # and the VRF ID 1187 # the VRF ID, and a flag to indicate whether to delete associated forward DNS entries 1188 # as well as the reverse entry 1187 1189 sub deleteBlock { 1188 my ($dbh,undef,$rdepth,$vrf ) = @_;1190 my ($dbh,undef,$rdepth,$vrf,$delfwd,$user) = @_; 1189 1191 my $cidr = new NetAddr::IP $_[1]; 1190 1192 … … 1240 1242 return ('FAIL',$msg); 1241 1243 } else { 1244 ##fixme: RPC return code? 1245 _rpc('delByCIDR', cidr => "$cidr", user => $user, delforward => $delfwd); 1242 1246 return ('OK',"OK"); 1243 1247 } … … 1258 1262 return ('FAIL', $msg); 1259 1263 } else { 1264 ##fixme: RPC return code? 1265 _rpc('delZone', zone => "$cidr", user => $user, revrec => 'y'); 1260 1266 return ('OK',"OK"); 1261 1267 } … … 1428 1434 return ('FAIL', $msg); 1429 1435 } else { 1436 ##fixme: RPC return code? 1437 _rpc('delByCIDR', cidr => "$cidr", user => $user, delforward => $delfwd, delsubs => 'y'); 1430 1438 return ($retcode, $goback); 1431 1439 } -
trunk/cgi-bin/main.cgi
r589 r590 890 890 my $blockinfo = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 891 891 892 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{rdepth}, $webvar{vrf} );892 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{rdepth}, $webvar{vrf}, $webvar{delforward}, $authuser); 893 893 894 894 $page->param(block => $webvar{block}); -
trunk/templates/delete.tmpl
r589 r590 3 3 <br> 4 4 5 <form action="main.cgi" method="POST" class="regular"> 6 <fieldset><legend class="noshow"> </legend> 5 7 <table class="indent" cellspacing="1" cellpadding="1"> 6 8 … … 66 68 <tr class="row<TMPL_IF privdata>0<TMPL_ELSE>1</TMPL_IF>"> 67 69 <td class="center" colspan="2"> 68 <form action="main.cgi" method="POST" class="regular">69 <fieldset><legend class="noshow"> </legend>70 70 <input type="button" value="Back" onclick="history.go(-1)"><input type="submit" value="Confirm"> 71 71 <input type="hidden" name="block" value="<TMPL_VAR NAME=block>"> 72 72 <input type="hidden" name="rdepth" value="<TMPL_VAR NAME=rdepth>"> 73 73 <input type="hidden" name="action" value="finaldelete"> 74 </fieldset>75 </form>76 74 </td> 77 75 </tr> 78 76 79 77 </table> 78 </fieldset> 79 </form>
Note:
See TracChangeset
for help on using the changeset viewer.