Skip to content

Commit

Permalink
Fix to only return published site nodes;
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Oct 22, 2010
1 parent f2fdf48 commit a2097f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/content_node_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.search(language, query, options)
values = []
total_results = 0
with_scope(:find => {
:conditions => ["language = ? AND MATCH (title,body) AGAINST (?)",language,query],
:conditions => ["language = ? AND content_nodes.published=1 AND MATCH (title,body) AGAINST (?)",language,query],
:include => [:content_node, :content_type],
:order => ["MATCH (title) AGAINST (",self.quote_value(query), ") DESC, MATCH (title,body) AGAINST (",self.quote_value(query), ") DESC"].join
}) do
Expand Down

0 comments on commit a2097f1

Please sign in to comment.