changeset 900:f2a30f704798 luisf

Merge from branch "bug_367"
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 02 Feb 2012 15:21:09 +0000
parents 4884d821863a (current diff) 5d5943de529f (diff)
children 6e80a22916e9 154205fd9f8b
files
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb	Thu Feb 02 14:04:20 2012 +0000
+++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb	Thu Feb 02 15:21:09 2012 +0000
@@ -34,6 +34,7 @@
           sort_update %w(name lft created_on updated_on)
           @limit = per_page_option
           @project_count = Project.visible_roots.find(@projects).count
+
           @project_pages = ActionController::Pagination::Paginator.new self, @project_count, @limit, params['page']
           @offset ||= @project_pages.current.offset
         end
@@ -120,9 +121,9 @@
           end
 
           if  @question == ""
-            @projects = Project.visible
+            @projects = Project.visible_roots
           else
-            @projects = Project.visible.search_by_question(@question)
+            @projects = Project.visible_roots.find(Project.visible.search_by_question(@question))
           end
   
           unless @tag_list.empty?
@@ -132,7 +133,7 @@
           
           @projects = @projects.collect{ |project| project.root }
           @projects = @projects.uniq
-
+                    
         end
       end
     end