Permalink
Browse files

Merge branch 'master' of git@github.com:gallery/gallery3

  • Loading branch information...
2 parents 56d04b1 + 5c52751 commit e7cfbfe376a117623e7e54a3f4469495a13e1a77 @bharat bharat committed Jan 29, 2010
@@ -51,6 +51,8 @@ static function logout() {
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))));
}
}
@@ -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)) {
@@ -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) {
@@ -26,6 +26,7 @@
$(document).ready(function() {
$("#g-profile-return").click(function(event) {
history.go(-1);
+ return false;
})
});
</script>

0 comments on commit e7cfbfe

Please sign in to comment.