Updates to INSTALL.debian documentation for 3.2.
[koha.git] / C4 / Koha.pm
index fb27ee2..ab9131a 100644 (file)
@@ -598,6 +598,7 @@ sub _getImagesFromDirectory {
     if ( opendir ( my $dh, $directoryname ) ) {
         my @images = grep { /\.(gif|png)$/i } readdir( $dh );
         closedir $dh;
+        @images = sort(@images);
         return @images;
     } else {
         warn "unable to opendir $directoryname: $!";
@@ -1241,6 +1242,9 @@ sub GetNormalizedISBN {
     my ($isbn,$record,$marcflavour) = @_;
     my @fields;
     if ($isbn) {
+        # Koha attempts to store multiple ISBNs in biblioitems.isbn, separated by " | "
+        # anything after " | " should be removed, along with the delimiter
+        $isbn =~ s/(.*)( \| )(.*)/$1/;
         return _isbn_cleanup($isbn);
     }
     return undef unless $record;