From 642ff326b7f4ac81cc31a98cb5c12b239cef4d6f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 28 Feb 2013 12:20:01 -0300 Subject: [PATCH] Bug 9731 - Remove changelanguage.pl in favor of opac-changelanguage.pl Remove that file that duplicates the behaviour of the correct opac-changelanguage.pl file and fix references to it in the templates. To test: - Apply the patch - Choose a different language in the OPAC - It should work as expected. To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Tested again at RM's request Signed-off-by: Chris Cormack Signed-off-by: Jared Camins-Esakov --- .../ccsr/en/includes/opac-bottom.inc | 4 +-- .../prog/en/includes/opac-bottom.inc | 4 +-- opac/changelanguage.pl | 28 ------------------- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100755 opac/changelanguage.pl diff --git a/koha-tmpl/opac-tmpl/ccsr/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/ccsr/en/includes/opac-bottom.inc index b89e6ac6ee..d360feee37 100644 --- a/koha-tmpl/opac-tmpl/ccsr/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/ccsr/en/includes/opac-bottom.inc @@ -47,7 +47,7 @@ [% IF ( sublanguages_loo.sublanguage_current ) %]
  • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
  • [% ELSE %] -
  • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
  • +
  • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
  • [% END %] [% END %] @@ -59,7 +59,7 @@ [% IF ( languages_loo.current ) %]
  • [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]
  • [% ELSE %] -
  • [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]
  • +
  • [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]
  • [% END %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc index 78c8bd36eb..b7495f944c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc @@ -22,7 +22,7 @@ [% IF ( sublanguages_loo.sublanguage_current ) %]
  • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
  • [% ELSE %] -
  • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
  • +
  • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
  • [% END %] [% END %] @@ -34,7 +34,7 @@ [% IF ( languages_loo.current ) %]
  • [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]
  • [% ELSE %] -
  • [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]
  • +
  • [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]
  • [% END %] [% END %] [% END %] diff --git a/opac/changelanguage.pl b/opac/changelanguage.pl deleted file mode 100755 index 60953240bd..0000000000 --- a/opac/changelanguage.pl +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use strict; -use warnings; - -use C4::Templates; -use CGI; - -my $query = new CGI; -my $language = $query->param('language'); -my $url = $query->referer(); - -C4::Templates::setlanguagecookie( $query, $language, $url ); -- 2.39.5