diff options
-rw-r--r-- | modules/gallery/helpers/auth.php | 4 | ||||
-rw-r--r-- | modules/gallery/helpers/locales.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/user_languages_block.html.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/user_profile.html.php | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/modules/gallery/helpers/auth.php b/modules/gallery/helpers/auth.php index 21a39bfb..bdff2f70 100644 --- a/modules/gallery/helpers/auth.php +++ b/modules/gallery/helpers/auth.php @@ -51,6 +51,8 @@ class auth_Core { module::event("user_logout", $user); } log::info("user", t("User %name logged out", array("name" => $user->name)), - html::anchor("user/$user->id", html::clean($user->name))); + t('<a href="%url">%user_name</a>', + array("url" => user_profile::url($user->id), + "user_name" => html::clean($user->name)))); } }
\ No newline at end of file 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)) { diff --git a/modules/gallery/views/user_languages_block.html.php b/modules/gallery/views/user_languages_block.html.php index 89185967..3776ca13 100644 --- a/modules/gallery/views/user_languages_block.html.php +++ b/modules/gallery/views/user_languages_block.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= form::dropdown("g-select-session-locale", $installed_locales, $selected) ?> <script type="text/javascript"> - $("#g-select-session-locale").change(function() { + $("select[name=g-select-session-locale]").change(function() { var old_locale_preference = <?= html::js_string($selected) ?>; var locale = $(this).val(); if (old_locale_preference == locale) { diff --git a/modules/gallery/views/user_profile.html.php b/modules/gallery/views/user_profile.html.php index 7dc9d13e..f35f8c3f 100644 --- a/modules/gallery/views/user_profile.html.php +++ b/modules/gallery/views/user_profile.html.php @@ -26,6 +26,7 @@ $(document).ready(function() { $("#g-profile-return").click(function(event) { history.go(-1); + return false; }) }); </script> |