https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41989
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194642|0 |1 is obsolete| | --- Comment #15 from David Cook <[email protected]> --- Created attachment 195106 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195106&action=edit Bug 41989: Call getlanguage after get_template_and_user This patch prevents the UI to randomly change the language when reaching addbooks The problem is that getlanguage is called BEFORE get_template_and_user, without, and "interface" (C4::Context->interface) is not set yet. Open C4/Languages.pm, search "sub getlanguage" We first read the cache, then if there is no interface we reach GetTranslatedLanguages that does return languages in a random order, then we pick the first one 765 @languages = map { $_->{rfc4646_subtag} } @{ getTranslatedLanguages( $interface, $theme ) }; 783 $language = shift @languages unless $language; We must call getlanguage AFTER that the cache is populated. Signed-off-by: David Cook <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
