]> git.koha-community.org Git - koha.git/commit
Bug 16776: Do not forget external language choice in language switcher
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 25 Jul 2016 15:37:03 +0000 (16:37 +0100)
committerFrédéric Demians <f.demians@tamil.fr>
Tue, 23 Aug 2016 09:51:49 +0000 (11:51 +0200)
commit55bdbc09e6a60d417cbc2d88bb90241fcac57aa2
treea4289733235ecd289eead82e92e2684eef422604
parente378c47bada7d244f09d354d14df72092ced8f61
Bug 16776: Do not forget external language choice in language switcher

If language is set by external link language switcher does not work

To reproduce:

- Have a multilingual koha installation, let's say en, de-CH, fr-FR and it-IT
- Create external links e.g. from your multilingual library website to each language variant of OPAC:

...cgi-bin/koha/opac-main.pl?language=en
...cgi-bin/koha/opac-main.pl?language=de-CH
...cgi-bin/koha/opac-main.pl?language=fr-FR
...cgi-bin/koha/opac-main.pl?language=it-IT

Each link opens fine displaying the language as appropriate.

Now try to switch language on the page you just opened via the external link.

It won't work, it will always stay on the language defined by the external link.

To test:
- Apply patch
- Repeat steps above
- Verify that the language switcher works
- Verify in browser address field that after switching language, the param 'language= 'has vanished from url string
- Try links with multiple params and with params containing 'language', e.g.
  ...cgi-bin/koha/opac-search.pl?language=fr-FR&q=language&mylanguage=test
- Verify that only the parameter 'language=' vanishes

Tested counter patch, works as well.
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 62d16aa6b750aaade2267596c19292659333f8c8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
changelanguage.pl
opac/opac-changelanguage.pl