fixes #1011
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Tag < ActiveRecord::Base
|
||||
METATAGS = "-user|user|-approver|approver|commenter|comm|noter|-pool|pool|-fav|fav|sub|md5|-rating|rating|width|height|mpixels|score|filesize|source|id|date|order|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|pixiv"
|
||||
METATAGS = "-user|user|-approver|approver|commenter|comm|noter|-pool|pool|-fav|fav|sub|md5|-rating|rating|-locked|locked|width|height|mpixels|score|filesize|source|id|date|order|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|pixiv"
|
||||
attr_accessible :category
|
||||
has_one :wiki_page, :foreign_key => "name", :primary_key => "title"
|
||||
|
||||
@@ -313,6 +313,12 @@ class Tag < ActiveRecord::Base
|
||||
when "rating"
|
||||
q[:rating] = $2
|
||||
|
||||
when "-locked"
|
||||
q[:locked_negated] = $2
|
||||
|
||||
when "locked"
|
||||
q[:locked] = $2
|
||||
|
||||
when "id"
|
||||
q[:post_id] = parse_helper($2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user