fixes #1484
This commit is contained in:
@@ -246,6 +246,12 @@ class PostQueryBuilder
|
|||||||
has_constraints!
|
has_constraints!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if q[:child] == "none"
|
||||||
|
relation = relation.where("posts.has_children = FALSE")
|
||||||
|
elsif q[:child] == "any"
|
||||||
|
relation = relation.where("posts.has_children = TRUE")
|
||||||
|
end
|
||||||
|
|
||||||
if q[:rating] =~ /^q/
|
if q[:rating] =~ /^q/
|
||||||
relation = relation.where("posts.rating = 'q'")
|
relation = relation.where("posts.rating = 'q'")
|
||||||
elsif q[:rating] =~ /^s/
|
elsif q[:rating] =~ /^s/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Tag < ActiveRecord::Base
|
class Tag < ActiveRecord::Base
|
||||||
METATAGS = "-user|user|-approver|approver|commenter|comm|noter|-pool|pool|-fav|fav|ordfav|sub|md5|-rating|rating|-locked|locked|width|height|mpixels|score|favcount|filesize|source|-source|id|-id|date|age|order|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|-parent|pixiv_id|pixiv"
|
METATAGS = "-user|user|-approver|approver|commenter|comm|noter|-pool|pool|-fav|fav|ordfav|sub|md5|-rating|rating|-locked|locked|width|height|mpixels|score|favcount|filesize|source|-source|id|-id|date|age|order|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|-parent|child|pixiv_id|pixiv"
|
||||||
attr_accessible :category, :as => [:moderator, :janitor, :contributor, :gold, :member, :anonymous, :default, :builder, :admin]
|
attr_accessible :category, :as => [:moderator, :janitor, :contributor, :gold, :member, :anonymous, :default, :builder, :admin]
|
||||||
attr_accessible :is_locked, :as => [:moderator, :janitor, :admin]
|
attr_accessible :is_locked, :as => [:moderator, :janitor, :admin]
|
||||||
has_one :wiki_page, :foreign_key => "title", :primary_key => "name"
|
has_one :wiki_page, :foreign_key => "title", :primary_key => "name"
|
||||||
@@ -474,6 +474,9 @@ class Tag < ActiveRecord::Base
|
|||||||
when "-parent"
|
when "-parent"
|
||||||
q[:parent_neg] = $2.downcase
|
q[:parent_neg] = $2.downcase
|
||||||
|
|
||||||
|
when "child"
|
||||||
|
q[:child] = $2.downcase
|
||||||
|
|
||||||
when "order"
|
when "order"
|
||||||
q[:order] = $2.downcase
|
q[:order] = $2.downcase
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user