Changeset 766 for trunk/cgi-bin
- Timestamp:
- 08/24/15 18:10:42 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r765 r766 680 680 } 681 681 682 # split up some linked data for static IPs via guided allocation. needed for breadcrumbs lite.683 ($webvar{alloc_from},$webvar{rdepth}) = split /,/, $webvar{alloc_from} if $webvar{alloc_from} =~ /,/;684 685 682 # $code is "success" vs "failure", $msg contains OK for a 686 683 # successful netblock allocation, the IP allocated for static … … 714 711 ); 715 712 713 my $pinfo = getBlockData($ip_dbh, $webvar{parent}); 714 715 # clean up a minor mess with guided allocation of static IPs 716 if ($webvar{alloctype} =~ /^.i$/) { 717 $insert_args{alloc_from} = $pinfo->{block}; 718 } 719 716 720 my ($code,$msg) = allocateBlock($ip_dbh, %insert_args, iprev => \%iprev); 717 721 718 722 if ($code eq 'OK') { 723 # breadcrumbs lite! provide at least a link to the parent of the block we just allocated. 724 $page->param(parentid => $webvar{parent}); 725 $page->param(parentblock => $pinfo->{block}); 726 719 727 if ($webvar{alloctype} =~ /^.i$/) { 720 728 $msg =~ s|/32||; 721 729 $page->param(staticip => $msg); 722 730 $page->param(custid => $webvar{custid}); 723 $page->param(parent => $webvar{parent}, pool => $webvar{alloc_from});724 731 $page->param(billinguser => $webvar{billinguser}); 725 732 mailNotify($ip_dbh, "a$webvar{alloctype}", "ADDED: $disp_alloctypes{$webvar{alloctype}} allocation", … … 732 739 $page->param(custid => $webvar{custid}); 733 740 734 # breadcrumbs lite! provide at least a link to the parent of the block we just allocated.735 my $binfo = getBlockData($ip_dbh, $webvar{parent});736 $page->param(parentid => $webvar{parent});737 $page->param(parentblock => $binfo->{block});738 739 741 # Full breadcrumbs 740 742 my $crumbs = getBreadCrumbs($ip_dbh, $webvar{parent}); … … 757 759 syslog "err", "Allocation of '$webvar{fullcidr}' to '$webvar{custid}' as ". 758 760 "'$webvar{alloctype}' by $authuser failed: '$msg'"; 759 $page->param(err => "Allocation of $webvar{fullcidr} as '$disp_alloctypes{$webvar{alloctype}}' ".760 " failed:<br>\n$msg\n");761 $page->param(err => "Allocation of $webvar{fullcidr} as '$disp_alloctypes{$webvar{alloctype}}' failed:"); 762 $page->param(errmsg => $msg); 761 763 } 762 764 … … 1429 1431 $page->param(block => $blockinfo->{block}); 1430 1432 $page->param(bdisp => $q->escapeHTML($disp_alloctypes{$blockinfo->{type}})); 1431 $page->param(delparent_id => $blockinfo->{parent_id}); # if $webvar{rdepth};1433 $page->param(delparent_id => $blockinfo->{parent_id}); 1432 1434 if ($pinfo) { 1433 1435 $page->param(delparent => $pinfo->{block});
Note:
See TracChangeset
for help on using the changeset viewer.