blacklists: remove ability for mods to blacklist uploaders by name.

This commit is contained in:
evazion
2020-02-16 03:51:48 -06:00
parent b591353773
commit caf54fe45a
5 changed files with 2 additions and 14 deletions

View File

@@ -3,8 +3,7 @@ class LegacyController < ApplicationController
def posts
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit], format: "json")
@post_set.posts = @post_set.posts.includes(:uploader)
@posts = @post_set.posts.map(&:legacy_attributes)
@posts = @post_set.posts.includes(:uploader).map(&:legacy_attributes)
respond_with(@posts) do |format|
format.xml do

View File

@@ -11,7 +11,7 @@ class PostsController < ApplicationController
end
else
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit], raw: params[:raw], random: params[:random], format: params[:format])
@posts = @post_set.posts = @post_set.posts.includes(:uploader) if !@post_set.is_random? && CurrentUser.is_moderator?
@posts = @post_set.posts
respond_with(@posts) do |format|
format.atom
end

View File

@@ -152,9 +152,6 @@ Blacklist.post_match = function(post, entry) {
var tags = String($post.attr("data-tags")).match(/\S+/g) || [];
tags = tags.concat(String($post.attr("data-pools")).match(/\S+/g) || []);
tags.push("rating:" + $post.data("rating"));
if ($post.attr("data-uploader")) {
tags.push("user:" + $post.attr("data-uploader").toLowerCase());
}
tags.push("uploaderid:" + $post.attr("data-uploader-id"));
$.each(String($post.data("flags")).match(/\S+/g) || [], function(i, v) {
tags.push("status:" + v);

View File

@@ -112,10 +112,6 @@ module PostSets
end
end
def posts=(set_posts)
@posts = set_posts
end
def unknown_post_count?
post_count == Danbooru.config.blank_tag_search_fast_count
end

View File

@@ -134,10 +134,6 @@ class PostPresenter < Presenter
"data-is-favorited" => post.favorited_by?(CurrentUser.user.id)
}
if CurrentUser.is_moderator?
attributes["data-uploader"] = post.uploader.name
end
if post.visible?
attributes["data-md5"] = post.md5
attributes["data-file-url"] = post.file_url