https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41989
--- Comment #4 from Jonathan Druart <[email protected]> --- Created attachment 194642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194642&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. -- 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/
