@ -52,6 +55,9 @@ class SearchController < ApplicationController
@results+=@project.documents.find(:all,:limit=>limit,:conditions=>[(["(LOWER(title) like ? OR LOWER(description) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@scope.include?'documents'
@results+=@project.wiki.pages.find(:all,:limit=>limit,:include=>:content,:conditions=>[(["(LOWER(title) like ? OR LOWER(text) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@project.wiki&&@scope.include?('wiki')
@results+=@project.repository.changesets.find(:all,:limit=>limit,:conditions=>[(["(LOWER(comments) like ?)"]*like_tokens.size).join(operator),*(like_tokens).sort])if@project.repository&&@scope.include?('changesets')
@results+=Message.find(:all,:include=>:board,:limit=>limit,:conditions=>[(["(LOWER(subject) like ? OR LOWER(content) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@scope.include?'messages'
@results+=Project.find(:all,:limit=>limit,:conditions=>[(["(LOWER(name) like ? OR LOWER(description) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@scope.include?'projects'