Changeset 576
- Timestamp:
- 12/21/12 17:49:08 (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r574 r576 1059 1059 return ('FAIL', 'No fields to update') if !@fieldlist; 1060 1060 1061 push @vallist, $args{block} ;1061 push @vallist, $args{block}, $args{rdepth}, $args{vrf}; 1062 1062 my $sql = "UPDATE $updtable SET "; 1063 1063 $sql .= join " = ?, ", @fieldlist; 1064 $sql .= " = ? WHERE $keyfield = ? ";1064 $sql .= " = ? WHERE $keyfield = ? AND rdepth = ? AND vrf = ?"; 1065 1065 1066 1066 eval { -
trunk/cgi-bin/main.cgi
r575 r576 621 621 622 622 # snag block info from db 623 my $blockinfo = getBlockData($ip_dbh, $webvar{block} );623 my $blockinfo = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 624 624 625 625 # Clean up extra whitespace on alloc type. Mainly a legacy-data cleanup. … … 627 627 628 628 $page->param(block => $webvar{block}); 629 $page->param(rdepth => $blockinfo->{rdepth}); 629 630 630 631 $page->param(custid => $blockinfo->{custid}); … … 715 716 type => $webvar{alloctype}, 716 717 swip => $webvar{swip}, 718 rdepth => $webvar{rdepth}, 717 719 ); 718 720 … … 745 747 746 748 # Link back to browse-routed or list-pool page on "Update complete" page. 747 my $cblock ;749 my $cblock = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 748 750 if (my $pooltype = ($webvar{alloctype} =~ /^(.)i$/) ) { 749 751 $page->param(backpool => 1); 750 $ cblock = ipParent($ip_dbh, $webvar{block});752 $page->param(backblock => $cblock->{pool}); 751 753 } else { 752 $ cblock = blockParent($ip_dbh, $webvar{block});753 } 754 $page->param(back block => $cblock->{cidr});754 $page->param(backblock => $cblock->{parent}); 755 } 756 $page->param(backdepth => ($webvar{rdepth})); 755 757 756 758 # Do some HTML fiddling here instead of using ESCAPE=HTML in the template, -
trunk/templates/edit.tmpl
r534 r576 12 12 <input type="hidden" name="action" value="update"> 13 13 <input type="hidden" name="block" value="<TMPL_VAR NAME=block>"> 14 <input type="hidden" name="rdepth" value="<TMPL_VAR NAME=rdepth>"> 14 15 </TMPL_IF> 15 16 … … 163 164 <input type="hidden" name="action" value="delete"> 164 165 <input type="hidden" name="block" value="<TMPL_VAR NAME=block>"> 165 <input type="hidden" name=" alloctype" value="<TMPL_VAR NAME=type>">166 <input type="hidden" name="rdepth" value="<TMPL_VAR NAME=rdepth>"> 166 167 <input type=submit value=" Delete this block "> 167 168 </div> -
trunk/templates/update.tmpl
r536 r576 65 65 <br> 66 66 <div class="backlink"> 67 <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=<TMPL_IF backpool>listpool&pool=<TMPL_ELSE>show routed&block=</TMPL_IF><TMPL_VAR NAME=backblock>">Back to <TMPL_VAR NAME=backblock></a>67 <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=<TMPL_IF backpool>listpool&pool=<TMPL_ELSE>showsubs&block=</TMPL_IF><TMPL_VAR NAME=backblock>&rdepth=<TMPL_VAR NAME=backdepth>">Back to <TMPL_VAR NAME=backblock></a> 68 68 </div> 69 69 </TMPL_IF>
Note:
See TracChangeset
for help on using the changeset viewer.