summaryrefslogtreecommitdiffstats
path: root/app/controllers/timelog_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-11 20:09:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-11 20:09:16 +0000
commit8c7b6012f5fcad7610093733da8d757d1677abc3 (patch)
tree8d92b42cc40db9675014bacca190b8589b4955df /app/controllers/timelog_controller.rb
parentec7c512693b9753ac312d678261eb76625c465fe (diff)
downloadredmine-8c7b6012f5fcad7610093733da8d757d1677abc3.tar.gz
redmine-8c7b6012f5fcad7610093733da8d757d1677abc3.zip
Removed unused code.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10985 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r--app/controllers/timelog_controller.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb
index eb9f7ead9..7c6e31de0 100644
--- a/app/controllers/timelog_controller.rb
+++ b/app/controllers/timelog_controller.rb
@@ -304,53 +304,6 @@ private
scope
end
- # Retrieves the date range based on predefined ranges or specific from/to param dates
- def retrieve_date_range
- @free_period = false
- @from, @to = nil, nil
-
- if params[:period_type] == '1' || (params[:period_type].nil? && !params[:period].nil?)
- case params[:period].to_s
- when 'today'
- @from = @to = Date.today
- when 'yesterday'
- @from = @to = Date.today - 1
- when 'current_week'
- @from = Date.today - (Date.today.cwday - 1)%7
- @to = @from + 6
- when 'last_week'
- @from = Date.today - 7 - (Date.today.cwday - 1)%7
- @to = @from + 6
- when 'last_2_weeks'
- @from = Date.today - 14 - (Date.today.cwday - 1)%7
- @to = @from + 13
- when '7_days'
- @from = Date.today - 7
- @to = Date.today
- when 'current_month'
- @from = Date.civil(Date.today.year, Date.today.month, 1)
- @to = (@from >> 1) - 1
- when 'last_month'
- @from = Date.civil(Date.today.year, Date.today.month, 1) << 1
- @to = (@from >> 1) - 1
- when '30_days'
- @from = Date.today - 30
- @to = Date.today
- when 'current_year'
- @from = Date.civil(Date.today.year, 1, 1)
- @to = Date.civil(Date.today.year, 12, 31)
- end
- elsif params[:period_type] == '2' || (params[:period_type].nil? && (!params[:from].nil? || !params[:to].nil?))
- begin; @from = params[:from].to_s.to_date unless params[:from].blank?; rescue; end
- begin; @to = params[:to].to_s.to_date unless params[:to].blank?; rescue; end
- @free_period = true
- else
- # default
- end
-
- @from, @to = @to, @from if @from && @to && @from > @to
- end
-
def parse_params_for_bulk_time_entry_attributes(params)
attributes = (params[:time_entry] || {}).reject {|k,v| v.blank?}
attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'}