summaryrefslogtreecommitdiffstats
path: root/app/controllers/search_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-20 20:31:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-20 20:31:04 +0000
commitb0be3b95aab8c01a7561431579c83cde07f3109f (patch)
treec1d102b7117176523e633e313526550acbcdd317 /app/controllers/search_controller.rb
parent94dbf641ffd7f479208b135b310585898058e20b (diff)
downloadredmine-b0be3b95aab8c01a7561431579c83cde07f3109f.tar.gz
redmine-b0be3b95aab8c01a7561431579c83cde07f3109f.zip
Ability to search a project and its subprojects (#1264).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1439 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r--app/controllers/search_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index d93c63808..d4ef01bf8 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -30,11 +30,13 @@ class SearchController < ApplicationController
@titles_only = !params[:titles_only].nil?
projects_to_search =
- case params[:projects]
+ case params[:scope]
when 'all'
nil
when 'my_projects'
User.current.memberships.collect(&:project)
+ when 'subprojects'
+ @project ? ([ @project ] + @project.active_children) : nil
else
@project
end