summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-08 14:31:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-08 14:31:15 +0000
commit4f4d447224a404919441371d71533bcfed78d853 (patch)
treedb5d752ae91c53750e0f3606ed12785a2b9f3dcd /app
parent9701c335628e244d0e08d3383e330331070cce4b (diff)
downloadredmine-4f4d447224a404919441371d71533bcfed78d853.tar.gz
redmine-4f4d447224a404919441371d71533bcfed78d853.zip
Fixed: Files without Version aren't visible in the Activity page (#2930).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2569 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 2ba75a3fd..2957b9dd1 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -33,7 +33,7 @@ class Attachment < ActiveRecord::Base
:author_key => :author_id,
:find_options => {:select => "#{Attachment.table_name}.*",
:joins => "LEFT JOIN #{Version.table_name} ON #{Attachment.table_name}.container_type='Version' AND #{Version.table_name}.id = #{Attachment.table_name}.container_id " +
- "LEFT JOIN #{Project.table_name} ON #{Version.table_name}.project_id = #{Project.table_name}.id"}
+ "LEFT JOIN #{Project.table_name} ON #{Version.table_name}.project_id = #{Project.table_name}.id OR ( #{Attachment.table_name}.container_type='Project' AND #{Attachment.table_name}.container_id = #{Project.table_name}.id )"}
acts_as_activity_provider :type => 'documents',
:permission => :view_documents,