summaryrefslogtreecommitdiff
path: root/httemplate/misc/delete-upload_target.html
blob: 2626e1defbf6fe6460cb764af4b5974f3840ec83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% if ( $error ) {
%   errorpage($error);
% } else {
<% $cgi->redirect("${p}browse/upload_target.html") %>
% }
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal targetnum";
my $targetnum = $1;

my $target = qsearchs('upload_target',{'targetnum'=>$targetnum});
my $error = $target->delete;

</%init>