Lines 57-66
if ( $op eq 'new' ) {
Link Here
|
57 |
|
57 |
|
58 |
} elsif ( $op eq 'search' ) { |
58 |
} elsif ( $op eq 'search' ) { |
59 |
my $uploads; |
59 |
my $uploads; |
60 |
if( $id ) { |
60 |
if( $id ) { # might be a comma separated list |
61 |
my $rec = Koha::UploadedFiles->find( $id ); |
61 |
my @id = split /,/, $id; |
62 |
undef $rec if $rec && $plugin && !$rec->public; |
62 |
foreach my $recid (@id) { |
63 |
push @$uploads, $rec->unblessed if $rec; |
63 |
my $rec = Koha::UploadedFiles->find( $recid ); |
|
|
64 |
push @$uploads, $rec->unblessed |
65 |
if $rec && ( $rec->public || !$plugin ); |
66 |
# Do not show private uploads in the plugin mode (:editor) |
67 |
} |
64 |
} else { |
68 |
} else { |
65 |
$uploads = Koha::UploadedFiles->search_term({ |
69 |
$uploads = Koha::UploadedFiles->search_term({ |
66 |
term => $term, |
70 |
term => $term, |
67 |
- |
|
|