summaryrefslogtreecommitdiffstats
path: root/vendor/plugins
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-02 17:16:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-02 17:16:06 +0000
commit1ce2ed065a24d954e3527f69848956ddebfac8a7 (patch)
tree9ff7796b178b1cc840cbbc2a7029fe3353a53ffe /vendor/plugins
parentd3386a5af784945f70e2c6d95e95e79946754a22 (diff)
downloadredmine-1ce2ed065a24d954e3527f69848956ddebfac8a7.tar.gz
redmine-1ce2ed065a24d954e3527f69848956ddebfac8a7.zip
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
Diffstat (limited to 'vendor/plugins')
-rw-r--r--vendor/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb b/vendor/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb
index d631935e0..bd38276f7 100644
--- a/vendor/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb
+++ b/vendor/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb
@@ -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])