[Koha-bugs] [Bug 6755] Problems with switching languages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 12 20:19:39 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6755

--- Comment #17 from Chris Cormack <chris at bigballofwax.co.nz> 2011-09-12 18:19:39 UTC ---
"1) The call in Output/gettemplate did not pass the CGI object to
C4::Templates->new. This routine called themelanguage but WITHOUT cgi object!
So it ignored the cookie. My patch now optionally adds the query parameter to
Templates->new and corrects the themelanguage call. "

I think this original contention is not correct

Looking at C4::Templates themelanguage

   my ( $htdocs, $tmpl, $interface ) = @_;                                      
    my $query = new CGI;                                                        

    # Set some defaults for language and theme                                  
    # First, check the user's preferences                                       
    my $lang;                                                                   

    # But, if there's a cookie set, obey it                                     
    $lang = $query->cookie('KohaOpacLanguage')                                  
      if ( defined $query and $query->cookie('KohaOpacLanguage') );


Its true $query is not passed, but its initiated there, and the cookie is
checked.

So I think the bug is something different, the new patch (and the old one)
reintroduce the behaviour of using the browsers language setting if no cookie
is set. Which was removed because it was causing problems.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list