summaryrefslogtreecommitdiffstats
path: root/app/controllers/timelog_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-05-22 10:48:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-05-22 10:48:59 +0000
commit12801ca031c0f8d209ddf2af0be36e09ed8cd727 (patch)
treee61f2766e33ba4a62fc0307a9c105ccb5e567f1e /app/controllers/timelog_controller.rb
parentef00501c36992221a1afa5f5bd4706ed91fbb7f1 (diff)
downloadredmine-12801ca031c0f8d209ddf2af0be36e09ed8cd727.tar.gz
redmine-12801ca031c0f8d209ddf2af0be36e09ed8cd727.zip
Fixed: GET /time_entries.xml ignores limit/offset parameters (#8356).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5881 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r--app/controllers/timelog_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb
index 2b752c674..16e6e2457 100644
--- a/app/controllers/timelog_controller.rb
+++ b/app/controllers/timelog_controller.rb
@@ -67,13 +67,13 @@ class TimelogController < ApplicationController
}
format.api {
@entry_count = TimeEntry.visible.count(:include => [:project, :issue], :conditions => cond.conditions)
- @entry_pages = Paginator.new self, @entry_count, per_page_option, params['page']
+ @offset, @limit = api_offset_and_limit
@entries = TimeEntry.visible.find(:all,
:include => [:project, :activity, :user, {:issue => :tracker}],
:conditions => cond.conditions,
:order => sort_clause,
- :limit => @entry_pages.items_per_page,
- :offset => @entry_pages.current.offset)
+ :limit => @limit,
+ :offset => @offset)
}
format.atom {
entries = TimeEntry.visible.find(:all,