Bugzilla – Attachment 75234 Details for
Bug 20695
Upload does not show all results when uploading multiple files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20695: Fix multiple upload result in tools/upload script
Bug-20695-Fix-multiple-upload-result-in-toolsuploa.patch (text/plain), 1.83 KB, created by
Katrin Fischer
on 2018-05-10 16:42:03 UTC
(
hide
)
Description:
Bug 20695: Fix multiple upload result in tools/upload script
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-05-10 16:42:03 UTC
Size:
1.83 KB
patch
obsolete
>From 7958b6ce1ebfb456a8611d2f1bad28b5a0a941fc Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 2 May 2018 14:50:32 +0200 >Subject: [PATCH] Bug 20695: Fix multiple upload result in tools/upload script >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Instead of calling UploadedFiles->find only once with $id, we should >extract all comma separated id's from the parameter. > >Test plan: >[1] Before this patch, upload two files at once in Tools/Upload. After doing > so, you should see only one result reported. But both files should > have been uploaded. >[2] With this patch, repeat step 1 and see two upload results. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Patch applies and functions as described. >Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > tools/upload.pl | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/tools/upload.pl b/tools/upload.pl >index dafb8dd39f..9b10b4226c 100755 >--- a/tools/upload.pl >+++ b/tools/upload.pl >@@ -57,10 +57,14 @@ if ( $op eq 'new' ) { > > } elsif ( $op eq 'search' ) { > my $uploads; >- if( $id ) { >- my $rec = Koha::UploadedFiles->find( $id ); >- undef $rec if $rec && $plugin && !$rec->public; >- push @$uploads, $rec->unblessed if $rec; >+ if( $id ) { # might be a comma separated list >+ my @id = split /,/, $id; >+ foreach my $recid (@id) { >+ my $rec = Koha::UploadedFiles->find( $recid ); >+ push @$uploads, $rec->unblessed >+ if $rec && ( $rec->public || !$plugin ); >+ # Do not show private uploads in the plugin mode (:editor) >+ } > } else { > $uploads = Koha::UploadedFiles->search_term({ > term => $term, >-- >2.17.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20695
:
74967
|
75199
| 75234