From 5c527513c688571adcff45f513efff54b9c55e61 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Thu, 28 Jan 2010 19:46:53 -0800 Subject: [PATCH] Fix language preference block / language cookie reading. The preference block must have been broken by a jquery update, and the cookie reading by a Kohana update. --- modules/gallery/helpers/locales.php | 4 +++- modules/gallery/views/user_languages_block.html.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/gallery/helpers/locales.php b/modules/gallery/helpers/locales.php index 5c8c227ad0..dc32b12ff2 100644 --- a/modules/gallery/helpers/locales.php +++ b/modules/gallery/helpers/locales.php @@ -238,7 +238,9 @@ static function set_request_locale() { } static function cookie_locale() { - $cookie_data = Input::instance()->cookie("g_locale"); + // Can't use Input framework for client side cookies since + // they're not signed. + $cookie_data = isset($_COOKIE["g_locale"]) ? $_COOKIE["g_locale"] : null; $locale = null; if ($cookie_data) { if (preg_match("/^([a-z]{2,3}(?:_[A-Z]{2})?)$/", trim($cookie_data), $matches)) { diff --git a/modules/gallery/views/user_languages_block.html.php b/modules/gallery/views/user_languages_block.html.php index 8918596750..3776ca1365 100644 --- a/modules/gallery/views/user_languages_block.html.php +++ b/modules/gallery/views/user_languages_block.html.php @@ -1,7 +1,7 @@