summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-01-28 19:46:53 -0800
committerAndy Staudacher <andy.st@gmail.com>2010-01-28 19:46:53 -0800
commit5c527513c688571adcff45f513efff54b9c55e61 (patch)
treef1721d710d2dc06c97da86e5a7931470ca02862d /modules/gallery/helpers
parentb8fb891828effa441a37efdd5babe03a5c7f5efe (diff)
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.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/locales.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/helpers/locales.php b/modules/gallery/helpers/locales.php
index 5c8c227a..dc32b12f 100644
--- a/modules/gallery/helpers/locales.php
+++ b/modules/gallery/helpers/locales.php
@@ -238,7 +238,9 @@ class locales_Core {
}
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)) {