Bugzilla – Attachment 45977 Details for
Bug 15225
Make HTML5Media work with file upload feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15225: [QA Follow-up] Improve changes to gethtml5media
Bug-15225-QA-Follow-up-Improve-changes-to-gethtml5.patch (text/plain), 1.49 KB, created by
Marcel de Rooy
on 2015-12-24 08:43:59 UTC
(
hide
)
Description:
Bug 15225: [QA Follow-up] Improve changes to gethtml5media
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-12-24 08:43:59 UTC
Size:
1.49 KB
patch
obsolete
>From 282449b8eaeb264cf0d6a3bd8108769ca958f538 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 16 Dec 2015 15:54:49 +0100 >Subject: [PATCH] Bug 15225: [QA Follow-up] Improve changes to gethtml5media >Content-Type: text/plain; charset=utf-8 > >[1] Improve readability, add some checks. >[2] Add the public flag for OPAC use. (If a file has not been marked as > public, we should not return it in OPAC.) > >Test plan: >See original commit. No changes in behavior. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/HTML5Media.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm >index 2bdb794..a53922e 100644 >--- a/C4/HTML5Media.pm >+++ b/C4/HTML5Media.pm >@@ -111,7 +111,12 @@ sub gethtml5media { > # extension > # check uploaded files > if ( $HTML5Media{srcblock} =~ /\Qopac-retrieve-file.pl\E/ ) { >- $HTML5Media{extension} = (Koha::Upload->new->get({ hashvalue => (split(/id=/, $HTML5Media{srcblock}))[1] })->{name} =~ m/([^.]+)$/)[0]; >+ my ( undef, $id ) = split /id=/, $HTML5Media{srcblock}; >+ next if !$id; >+ my $public = ( ( caller )[1] =~ /opac/ ) ? { public => 1 }: {}; >+ my $upl = Koha::Upload->new( $public )->get({ hashvalue => $id }); >+ next if !$upl || $upl->{name} !~ /\./; >+ $HTML5Media{extension} = ( $upl->{name} =~ m/([^.]+)$/ )[0]; > } > # check remote files > else { >-- >1.7.10.4
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 15225
:
45205
|
45724
|
45725
|
45975
|
45976
| 45977