Bugzilla – Attachment 3783 Details for
Bug 5660
Webinstaller should check if KohaOpacLanguage exists in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Revised patch
patch.txt (text/plain), 1.85 KB, created by
Marcel de Rooy
on 2011-04-07 12:28:59 UTC
(
hide
)
Description:
Revised patch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2011-04-07 12:28:59 UTC
Size:
1.85 KB
patch
obsolete
>From c91ef48dca90560f79ff1eb39fbd774565292ce0 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 7 Apr 2011 14:10:40 +0200 >Subject: [PATCH] [REVISED] 5660 Webinstaller should check if KohaOpacLanguage exists in staff >Content-Type: text/plain; charset="utf-8" > >Small revision on April 7. >--- > installer/InstallAuth.pm | 21 +++++++++++++++++---- > 1 files changed, 17 insertions(+), 4 deletions(-) > >diff --git a/installer/InstallAuth.pm b/installer/InstallAuth.pm >index 3a55b21..9885d19 100644 >--- a/installer/InstallAuth.pm >+++ b/installer/InstallAuth.pm >@@ -109,10 +109,8 @@ InstallAuth - Authenticates Koha users for Install process > sub get_template_and_user { > my $in = shift; > my $query = $in->{'query'}; >- my $language = $query->cookie('KohaOpacLanguage'); >- my $path = >- C4::Context->config('intrahtdocs') . "/prog/" >- . ( $language ? $language : "en" ); >+ my $language =_get_template_language($query->cookie('KohaOpacLanguage')); >+ my $path = C4::Context->config('intrahtdocs'). "/prog/". $language; > my $template = HTML::Template::Pro->new( > filename => "$path/modules/" . $in->{template_name}, > die_on_bad_params => 1, >@@ -159,6 +157,21 @@ sub get_template_and_user { > return ( $template, $borrowernumber, $cookie ); > } > >+sub _get_template_language { >+ #verify if opac language exists in staff (bug 5660) >+ #conditions are 1) dir exists and 2) enabled in prefs >+ my ($opaclang)= @_; >+ return 'en' unless $opaclang; >+ my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang"; >+ my $pref= ','.C4::Context->preference('language').','; >+ if(-d $path) { >+ if($pref =~ /,$opaclang,/ ) { >+ return $opaclang; >+ } >+ } >+ return 'en'; >+} >+ > =item checkauth > > ($userid, $cookie, $sessionID) = &checkauth($query, $noauth, $flagsrequired, $type); >-- >1.6.0.6 >
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 5660
:
3025
|
3783
|
3856
|
3857
|
4008
|
4136
|
4840