Commit 1ce2ed06 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: activity broken by r2066 with postgresql (#2266).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2083 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent d3386a5a
......@@ -66,8 +66,11 @@ module Redmine
end
cond.add(Project.allowed_to_condition(user, provider_options[:permission], options)) if provider_options[:permission]
scope_options[:conditions] = cond.conditions
scope_options[:order] = "#{provider_options[:timestamp]} DESC"
scope_options[:limit] = options[:limit]
if options[:limit]
# id and creation time should be in same order in most cases
scope_options[:order] = "#{table_name}.id DESC"
scope_options[:limit] = options[:limit]
end
with_scope(:find => scope_options) do
find(:all, provider_options[:find_options])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment