forked from e621ng/e621ng
[Cleanup] Remove pixiv_id
This commit is contained in:
parent
ee8fb64861
commit
aa8e1037bf
@ -28,6 +28,7 @@ module PostIndex
|
||||
indexes :comment_count, type: 'integer'
|
||||
|
||||
indexes :file_size, type: 'integer'
|
||||
# TODO: Remove
|
||||
indexes :pixiv_id, type: 'integer'
|
||||
indexes :parent, type: 'integer'
|
||||
indexes :pools, type: 'integer'
|
||||
|
@ -368,16 +368,6 @@ class ElasticPostQueryBuilder
|
||||
must.push({term: {has_children: true}})
|
||||
end
|
||||
|
||||
if q[:pixiv_id]
|
||||
if q[:pixiv_id] == "any"
|
||||
must.push({exists: {field: :pixiv_id}})
|
||||
elsif q[:pixiv_id] == "none"
|
||||
must_not.push({exists: {field: :pixiv_id}})
|
||||
else
|
||||
must.push({term: {pixiv_id: q[:pixiv_id].to_i}})
|
||||
end
|
||||
end
|
||||
|
||||
if q[:rating] =~ /\Aq/
|
||||
must.push({term: {rating: "q"}})
|
||||
elsif q[:rating] =~ /\As/
|
||||
|
@ -283,16 +283,6 @@ class PostQueryBuilder
|
||||
relation = relation.where("posts.has_children = TRUE")
|
||||
end
|
||||
|
||||
if q[:pixiv_id]
|
||||
if q[:pixiv_id] == "any"
|
||||
relation = relation.where("posts.pixiv_id IS NOT NULL")
|
||||
elsif q[:pixiv_id] == "none"
|
||||
relation = relation.where("posts.pixiv_id IS NULL")
|
||||
else
|
||||
relation = add_range_relation(q[:pixiv_id], "posts.pixiv_id", relation)
|
||||
end
|
||||
end
|
||||
|
||||
if q[:rating] =~ /^q/
|
||||
relation = relation.where("posts.rating = 'q'")
|
||||
elsif q[:rating] =~ /^s/
|
||||
|
@ -18,7 +18,7 @@ class Tag < ApplicationRecord
|
||||
-pool pool ordpool -fav fav -favoritedby favoritedby md5 -rating rating note -note
|
||||
-locked locked width height mpixels ratio score favcount filesize source
|
||||
-source id -id date age order limit -status status tagcount parent -parent
|
||||
child pixiv_id pixiv search upvote downvote voted filetype -filetype flagger type -type
|
||||
child search upvote downvote voted filetype -filetype flagger type -type
|
||||
-flagger disapproval -disapproval set -set randseed -voted
|
||||
-upvote -downvote description -description change -user_id user_id delreason -delreason
|
||||
deletedby -deletedby votedup voteddown -votedup -voteddown duration
|
||||
@ -925,13 +925,6 @@ class Tag < ApplicationRecord
|
||||
q[:deleter_neg] = User.name_or_id_to_id(g2)
|
||||
q[:status] ||= 'any'
|
||||
|
||||
when "pixiv_id", "pixiv"
|
||||
if g2.downcase == "any" || g2.downcase == "none"
|
||||
q[:pixiv_id] = g2.downcase
|
||||
else
|
||||
q[:pixiv_id] = parse_helper(g2)
|
||||
end
|
||||
|
||||
when "upvote", "votedup"
|
||||
if CurrentUser.is_moderator?
|
||||
q[:upvote] = User.name_or_id_to_id(g2)
|
||||
|
Loading…
Reference in New Issue
Block a user