summaryrefslogtreecommitdiff
path: root/httemplate/config/config-delete.cgi
diff options
context:
space:
mode:
authorjeff <jeff>2007-07-18 18:07:38 +0000
committerjeff <jeff>2007-07-18 18:07:38 +0000
commitcc0c6be1aa795f85d05f15a3e8568fcef2bbd380 (patch)
treeec860b85f11d59ccedfce77cf9d82fbf40eb9107 /httemplate/config/config-delete.cgi
parent53d68b31e5ec07704c53829548c537bac03b8894 (diff)
config in database cleanup, editing, and agent-specific config (452, 1419)
Diffstat (limited to 'httemplate/config/config-delete.cgi')
-rw-r--r--httemplate/config/config-delete.cgi15
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") %>