adds comm shortcut for comment metatags
This commit is contained in:
@@ -245,10 +245,10 @@ class PostQueryBuilder
|
|||||||
when "favcount_asc"
|
when "favcount_asc"
|
||||||
relation = relation.order("posts.fav_count ASC, posts.id DESC")
|
relation = relation.order("posts.fav_count ASC, posts.id DESC")
|
||||||
|
|
||||||
when "comment"
|
when "comment", "comm"
|
||||||
relation = relation.order("posts.last_commented_at DESC, posts.id DESC").where("posts.last_commented_at is not null")
|
relation = relation.order("posts.last_commented_at DESC, posts.id DESC").where("posts.last_commented_at is not null")
|
||||||
|
|
||||||
when "comment_asc"
|
when "comment_asc", "comm_asc"
|
||||||
relation = relation.order("posts.last_commented_at ASC, posts.id DESC").where("posts.last_commented_at is not null")
|
relation = relation.order("posts.last_commented_at ASC, posts.id DESC").where("posts.last_commented_at is not null")
|
||||||
|
|
||||||
when "note"
|
when "note"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class Tag < ActiveRecord::Base
|
class Tag < ActiveRecord::Base
|
||||||
METATAGS = "-user|user|-approver|approver|commenter|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|width|height|mpixels|score|filesize|source|id|date|order|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|pixiv"
|
||||||
attr_accessible :category
|
attr_accessible :category
|
||||||
has_one :wiki_page, :foreign_key => "name", :primary_key => "title"
|
has_one :wiki_page, :foreign_key => "name", :primary_key => "title"
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ class Tag < ActiveRecord::Base
|
|||||||
q[:approver_id] = User.name_to_id($2)
|
q[:approver_id] = User.name_to_id($2)
|
||||||
q[:approver_id] = -1 if q[:approver_id].nil?
|
q[:approver_id] = -1 if q[:approver_id].nil?
|
||||||
|
|
||||||
when "commenter"
|
when "commenter", "comm"
|
||||||
q[:commenter_id] = User.name_to_id($2)
|
q[:commenter_id] = User.name_to_id($2)
|
||||||
q[:commenter_id] = -1 if q[:commenter_id].nil?
|
q[:commenter_id] = -1 if q[:commenter_id].nil?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user