Bugzilla – Attachment 31226 Details for
Bug 12539
PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12539: Follow up to fix fallback theme
Bug-12539-Follow-up-to-fix-fallback-theme.patch (text/plain), 1.60 KB, created by
Petter Goksøyr Åsen
on 2014-08-28 06:45:41 UTC
(
hide
)
Description:
Bug 12539: Follow up to fix fallback theme
Filename:
MIME Type:
Creator:
Petter Goksøyr Åsen
Created:
2014-08-28 06:45:41 UTC
Size:
1.60 KB
patch
obsolete
>From f52a519c7fedf4b2de7368e4f922a0f164bb19de Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sun, 3 Aug 2014 09:41:37 -0300 >Subject: [PATCH] Bug 12539: Follow up to fix fallback theme > >The is a problem in the logic, fallback must be: >1. Requested (theme, lang, tmpl) >a. return (theme, lang, tmpl), if not >b. return (fallback, lang, tmpl), if not >c. return (theme, 'en', tmpl), if not as last resort >d. return (fallback, 'en', tmpl) > >Previous patch missed option 'c', worked for CCSR >but not bootstrap, sorry. > >Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com> >--- > C4/Templates.pm | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/C4/Templates.pm b/C4/Templates.pm >index 2c57718..879249a 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -256,14 +256,18 @@ sub themelanguage { > my $fallback = C4::Context->preference( ($interface eq 'intranet') ? 'template' : 'OPACFallback' ); > push @themes, $fallback; > >- # Try to find first theme for the selected language >+ # Try to find first theme for the selected theme/lang, then for fallback/lang > for my $theme (@themes) { > if ( -e "$htdocs/$theme/$lang/modules/$tmpl" ) { > return ($theme, $lang, \@themes); > } > } >- # Otherwise, return fallback theme in English 'en' >- return ($fallback, 'en', \@themes); >+ # Otherwise return theme/'en', last resort fallback/'en' >+ for my $theme (@themes) { >+ if ( -e "$htdocs/$theme/en/modules/$tmpl" ) { >+ return ($theme, 'en', \@themes); >+ } >+ } > } > > >-- >1.8.3.2
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 12539
:
29556
|
30439
|
30481
|
30516
|
31224
|
31225
|
31226
|
31295
|
31296