This commit is contained in:
Toks
2013-03-30 16:43:13 -04:00
parent 190d1b1488
commit 0f8cef588e
2 changed files with 23 additions and 1 deletions

View File

@@ -220,6 +220,22 @@ class PostQueryBuilder
relation = relation.where("posts.rating <> 'e'")
end
if q[:locked] == "rating"
relation = relation.where("posts.is_rating_locked = TRUE")
elsif q[:locked] == "note" || q[:locked] == "notes"
relation = relation.where("posts.is_note_locked = TRUE")
elsif q[:locked] == "status"
relation = relation.where("posts.is_status_locked = TRUE")
end
if q[:locked_negated] == "rating"
relation = relation.where("posts.is_rating_locked = FALSE")
elsif q[:locked_negated] == "note" || q[:locked_negated] == "notes"
relation = relation.where("posts.is_note_locked = FALSE")
elsif q[:locked_negated] == "status"
relation = relation.where("posts.is_status_locked = FALSE")
end
relation = add_tag_string_search_relation(q[:tags], relation)
if q[:order] == "rank"