* Added time zone support: users can select their time zone on their account view.

* Updated Polish translation (Mariusz Olejnik).
* Fixed: Projects should be listed with case mixed.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@917 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2007-11-19 22:28:43 +00:00
1 parent a1f3497ec4
commit deb182337d
24 files changed
+104 -61

No files matched your search

+8
View File
@@ -130,6 +130,10 @@ class User < ActiveRecord::Base
self.preference ||= UserPreference.new(:user => self)
end
def time_zone
self.pref.time_zone.nil? ? nil : TimeZone[self.pref.time_zone]
end
# Return user's RSS key (a 40 chars long string), used to access feeds
def rss_key
token = self.rss_token || Token.create(:user => self, :action => 'feeds')
@@ -231,6 +235,10 @@ class AnonymousUser < User
false
end
def time_zone
nil
end
# Anonymous user has no RSS key
def rss_key
nil