diff options
Diffstat (limited to 'httemplate/config/config-delete.cgi')
-rw-r--r-- | httemplate/config/config-delete.cgi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/httemplate/config/config-delete.cgi b/httemplate/config/config-delete.cgi new file mode 100644 index 000000000..cdac434fa --- /dev/null +++ b/httemplate/config/config-delete.cgi @@ -0,0 +1,15 @@ +<%init> +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+)$/; +my $confnum = $1; + +my $conf = qsearchs('conf', {'confnum' => $confnum}); +die "Configuration not found!" unless $conf; +$conf->delete; + +</%init> +<% $cgi->redirect(popurl(2) . "browse/agent.cgi") %> |