diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-09 12:29:55 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-09 12:29:55 +0400 |
commit | cb589d231aaa9f4cf7a10c41d6fd1ebe34428173 (patch) | |
tree | d919740661ecacf712ae6fd9d39146287afa77c1 /app/controllers/search_controller.rb | |
parent | f8f76fdbfd06184c53c4dc3832601f3c07aeba77 (diff) |
Fix public project search
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r-- | app/controllers/search_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 2bdc9c366f2..407048233e1 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -15,7 +15,7 @@ class SearchController < ApplicationController @total_results = @projects.count + @merge_requests.count + @issues.count + @wiki_pages.count + @blobs.total_count end - private + private def find_project_ids(group_id, project_id) project_ids = current_user.authorized_projects.map(&:id) @@ -26,7 +26,7 @@ class SearchController < ApplicationController project_ids.select! { |id| group_project_ids.include?(id) } elsif project_id.present? @project = Project.find(project_id) - project_ids = @project.public ? [@project.id] : project_ids.select { |id| id == project_id.to_i } + project_ids = @project.public? ? [@project.id] : project_ids.select { |id| id == project_id.to_i } end project_ids end |