* Add enclair_db option to UserDB.pm. Allows logging of enclair password
[interchange.git] / code / UI_Tag / check_upload.coretag
1 # Copyright 2002-2007 Interchange Development Group and others
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.  See the LICENSE file for details.
7
8 # $Id: check_upload.coretag,v 1.4 2007-03-30 23:40:54 pajamian Exp $
9
10 UserTag check-upload Order     file same
11 UserTag check-upload PosNumber 2
12 UserTag check-upload Version   $Revision: 1.4 $
13 UserTag check-upload Routine   <<EOR
14 sub {
15         use File::Copy;
16         my $file = shift;
17         my $same = shift;
18         my $dir = $Vend::Cfg->{ProductDir};
19         $same = $same ? '' : '+';
20         if (-s "upload/$file") {
21                 File::Copy::copy "upload/$file", "$dir/$file$same"
22                         or return "Couldn't copy uploaded file!";
23                 unlink "upload/$file";
24         }
25         return '';
26 }
27 EOR