Bugzilla – Attachment 57733 Details for
Bug 17673
HTML5Media: Using an OPAC URL for an uploaded file does not always work in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17673: HTML5Media: Using an OPAC URL for an uploaded file does not always work in staff
Bug-17673-HTML5Media-Using-an-OPAC-URL-for-an-uplo.patch (text/plain), 1.31 KB, created by
Marcel de Rooy
on 2016-11-24 07:55:10 UTC
(
hide
)
Description:
Bug 17673: HTML5Media: Using an OPAC URL for an uploaded file does not always work in staff
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-11-24 07:55:10 UTC
Size:
1.31 KB
patch
obsolete
>From aa1957861ab36130495d5181e31d5fb8954039c7 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 24 Nov 2016 08:42:51 +0100 >Subject: [PATCH] Bug 17673: HTML5Media: Using an OPAC URL for an uploaded file > does not always work in staff >Content-Type: text/plain; charset=utf-8 > >If you did not fill OPACBaseURL, the media URL for an uploaded file will >work in OPAC, but not in staff. >You can solve that by filling OPACBaseURL correctly. >We could also add a simple replace in C4/HTML5Media.pm. > >Test plan: >[1] Add an upload (say .webm file) via 856$u in editor. > Put 'video/webm' into 856$q. >[2] Check media tab in opac and staff detail. >--- > C4/HTML5Media.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm >index 1ac22f1..4093a2d 100644 >--- a/C4/HTML5Media.pm >+++ b/C4/HTML5Media.pm >@@ -139,6 +139,10 @@ sub gethtml5media { > hashvalue => $id, %public, > })->next; > next if !$upload || $upload->filename !~ /\./; >+ if( !$public{public} && >+ !C4::Context->preference('OPACBaseURL') ) { >+ $HTML5Media{srcblock} =~ s/opac-retrieve/opac\/opac-retrieve/; >+ } > $HTML5Media{extension} = ( $upload->filename =~ m/([^.]+)$/ )[0]; > } > # check remote files >-- >2.1.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 17673
:
57732
| 57733