diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/misc/cust_attachment.cgi | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/misc/cust_attachment.cgi')
-rw-r--r-- | httemplate/misc/cust_attachment.cgi | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/httemplate/misc/cust_attachment.cgi b/httemplate/misc/cust_attachment.cgi deleted file mode 100644 index d1ec777d8..000000000 --- a/httemplate/misc/cust_attachment.cgi +++ /dev/null @@ -1,34 +0,0 @@ -<% '',$cgi->redirect(popurl(2). "browse/cust_attachment.html?$browse_opts") %> -<%init> - -$cgi->param('action') =~ /^(Delete|Undelete|Purge) selected$/ - or die "Illegal action"; -my $action = $1; - -my $browse_opts = join(';', map { $_.'='.$cgi->param($_) } - qw( orderby show_deleted ) - ); - -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right("$action attachment"); - -foreach my $attachnum ( - map { /^attachnum(\d+)$/; $1; } grep /^attachnum\d+$/, $cgi->param - ) { - my $attach = qsearchs('cust_attachment', { 'attachnum' => $attachnum }); - my $error; - if ( $action eq 'Delete' and !$attach->disabled ) { - $attach->disabled(time); - $error = $attach->replace; - } - elsif ( $action eq 'Undelete' and $attach->disabled ) { - $attach->disabled(''); - $error = $attach->replace; - } - elsif ( $action eq 'Purge' and $attach->disabled ) { - $error = $attach->delete; - } - die $error if $error; -} - -</%init> |