|
Lines 20-26
Link Here
|
| 20 |
# You should have received a copy of the GNU General Public License |
20 |
# You should have received a copy of the GNU General Public License |
| 21 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
21 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 22 |
|
22 |
|
| 23 |
use Modern::Perl; |
|
|
| 24 |
|
23 |
|
| 25 |
# This plugin does not use the plugin launcher. It refers to tools/upload.pl. |
24 |
# This plugin does not use the plugin launcher. It refers to tools/upload.pl. |
| 26 |
# That script and template support using it as a plugin. |
25 |
# That script and template support using it as a plugin. |
|
Lines 30-44
use Modern::Perl;
Link Here
|
| 30 |
# the possibility to delete the uploaded file. If the field is empty, you |
29 |
# the possibility to delete the uploaded file. If the field is empty, you |
| 31 |
# can upload a new file. |
30 |
# can upload a new file. |
| 32 |
|
31 |
|
| 33 |
use CGI qw ( -utf8 ); |
32 |
use Modern::Perl; |
| 34 |
use C4::Auth qw( check_cookie_auth ); |
33 |
use C4::Auth (); |
| 35 |
my $input = CGI->new; |
34 |
|
| 36 |
my ($auth_status) = |
35 |
C4::Auth::check_value_builder_caller(); |
| 37 |
check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } ); |
|
|
| 38 |
if ( $auth_status ne "ok" ) { |
| 39 |
print $input->header( -type => 'text/plain', -status => '403 Forbidden' ); |
| 40 |
exit 0; |
| 41 |
} |
| 42 |
|
36 |
|
| 43 |
my $builder = sub { |
37 |
my $builder = sub { |
| 44 |
my ( $params ) = @_; |
38 |
my ( $params ) = @_; |
| 45 |
- |
|
|