gantt: code layout cleanup initialize method of lib/redmine/helpers/gantt.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10342 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-09-10 11:54:49 +00:00
parent e637c15660
commit d0ca8eb703
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ module Redmine
months = (options[:months] || User.current.pref[:gantt_months]).to_i
@months = (months > 0 && months < 25) ? months : 6
# Save gantt parameters as user preference (zoom and months count)
if (User.current.logged? && (@zoom != User.current.pref[:gantt_zoom] || @months != User.current.pref[:gantt_months]))
if (User.current.logged? && (@zoom != User.current.pref[:gantt_zoom] ||
@months != User.current.pref[:gantt_months]))
User.current.pref[:gantt_zoom], User.current.pref[:gantt_months] = @zoom, @months
User.current.preference.save
end