summaryrefslogtreecommitdiffstats
path: root/lib/redmine/helpers/gantt.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-05-08 08:57:31 +0000
committerGo MAEDA <maeda@farend.jp>2019-05-08 08:57:31 +0000
commit391a9469d1c9b72f14114a6019a4c19d499ee389 (patch)
tree2b8bab72c502bd9ce3de568bb1cbdc862f19259b /lib/redmine/helpers/gantt.rb
parent86ca2e282a6dcac22bfbf693d1aed0de3a09804b (diff)
downloadredmine-391a9469d1c9b72f14114a6019a4c19d499ee389.tar.gz
redmine-391a9469d1c9b72f14114a6019a4c19d499ee389.zip
Allow a bigger range for the gantt timeline (#14654).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@18136 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers/gantt.rb')
-rw-r--r--lib/redmine/helpers/gantt.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index ac2b34e3d..12c5044f6 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -67,7 +67,7 @@ module Redmine
zoom = (options[:zoom] || User.current.pref[:gantt_zoom]).to_i
@zoom = (zoom > 0 && zoom < 5) ? zoom : 2
months = (options[:months] || User.current.pref[:gantt_months]).to_i
- @months = (months > 0 && months < 25) ? months : 6
+ @months = (months > 0 && months < Setting.gantt_months_limit.to_i + 1) ? 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]))