Skip to content

Commit

Permalink
言語設定変更時に、即時に適用するようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
kawahara committed Aug 19, 2010
1 parent 5a29126 commit 486e5bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/form/MemberConfigForm/MemberConfigLanguageForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,19 @@
class MemberConfigLanguageForm extends MemberConfigForm
{
protected $category = 'language';

public function save()
{
if ($language = $this->getValue('language'))
{
sfContext::getInstance()->getUser()->setCulture($language);
}

if ($timezone = $this->getValue('time_zone'))
{
sfContext::getInstance()->getUser()->setTimezone($timezone);
}

return parent::save();
}
}

0 comments on commit 486e5bd

Please sign in to comment.