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 <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
|
||
|---|---|---|
| .. | ||
| value_builder | ||
| addbiblio.pl | ||
| addbooks.pl | ||
| additem.pl | ||
| cataloging-home.pl | ||
| concerns.pl | ||
| editor.pl | ||
| linkitem.pl | ||
| merge.pl | ||
| merge_ajax.pl | ||
| moveitem.pl | ||
| plugin_launcher.pl | ||
| ysearch.pl | ||
| z3950_auth_search.pl | ||
| z3950_search.pl | ||