diff options
author | cvs2git <cvs2git> | 2009-10-11 02:42:17 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2009-10-11 02:42:17 +0000 |
commit | a83a000a027d1272e813259d09230d701d84df64 (patch) | |
tree | 71500c957e6d7db3e1ad3d59e74ca7bbb14e44ff /httemplate/config/config-delete.cgi | |
parent | 097a12385d80ef52f37d4cc2bb93bc3f81e6f8e6 (diff) | |
parent | 0b69c091543b56a45f2ae6b8718fc67f381a6686 (diff) |
This commit was manufactured by cvs2svn to create branchfreeside_1_9_1
'FREESIDE_1_9_BRANCH'.
Diffstat (limited to 'httemplate/config/config-delete.cgi')
-rw-r--r-- | httemplate/config/config-delete.cgi | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/httemplate/config/config-delete.cgi b/httemplate/config/config-delete.cgi index cdac434fa..a05cb1e14 100644 --- a/httemplate/config/config-delete.cgi +++ b/httemplate/config/config-delete.cgi @@ -2,14 +2,21 @@ die "access denied\n" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); -die "No configuration item specified (bad URL)!" unless $cgi->keywords; -my ($query) = $cgi->keywords; -$query =~ /^(\d+)$/; +$cgi->param('confnum') =~ /^(\d+)$/ or die "illegal or missing confnum"; my $confnum = $1; my $conf = qsearchs('conf', {'confnum' => $confnum}); die "Configuration not found!" unless $conf; $conf->delete; +my $redirect = popurl(2); +if ( $cgi->param('redirect') eq 'config_view_showagent' ) { + $redirect .= 'config/config-view.cgi?showagent=1#'. $conf->name; +} elsif ( $cgi->param('redirect') eq 'config_view' ) { + $redirect .= 'config/config-view.cgi'; +} else { + $redirect .= 'browse/agent.cgi'; +} + </%init> -<% $cgi->redirect(popurl(2) . "browse/agent.cgi") %> +<% $cgi->redirect($redirect) %> |