Bug 6874: QA follow-up
authorPaul Poulain <paul.poulain@biblibre.com>
Tue, 19 Mar 2013 09:48:08 +0000 (10:48 +0100)
committerTomas Cohen Arazi <tomascohen@unc.edu.ar>
Fri, 7 Aug 2015 18:22:06 +0000 (15:22 -0300)
Squash of the following commits:
  return with explicit undef removed
  Follow-up for PBP fixes
  follow-up fix POD syntax
  follow-up jquery has moved

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: removed POD changes in Biblio.pm while rebasing.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
C4/UploadedFiles.pm
cataloguing/value_builder/upload.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload.tt
opac/opac-retrieve-file.pl

index 246b02b..1574e99 100644 (file)
@@ -180,7 +180,7 @@ sub UploadFile {
         return $id;
     }
 
-    return undef;
+    return;
 }
 
 =head2 DelUploadedFile
index 0cb33f4..03ad77b 100755 (executable)
@@ -140,7 +140,7 @@ sub finddirs {
     my $base = shift || $upload_path;
     my $found = 0;
     my @dirs;
-    my @files = <$base/*>;
+    my @files = glob("$base/*");
     foreach (@files) {
         if (-d $_ and -w $_) {
             my $lastdirname = basename($_);
index 4fae58a..da40360 100644 (file)
@@ -4,7 +4,7 @@
 <head>
     <title>Upload plugin</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script>
+    <script type="text/javascript" src="/intranet-tmpl/lib/jquery/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="[% themelang %]/css/staff-global.css" />
 
 </head>
index ddbf1ac..d5406e6 100755 (executable)
@@ -32,12 +32,12 @@ exit 1 if not $file;
 my $file_path = $file->{filepath};
 
 if( -f $file_path ) {
-    open FH, '<', $file_path or die "Can't open file: $!";
+    open my $fh, '<', $file_path or die "Can't open file: $!";
     print $input->header(
         -type => "application/octet-stream",
         -attachment => $file->{filename}
     );
-    while(<FH>) {
+    while(<$fh>) {
         print $_;
     }
 } else {