Fix #2352: return raw usernames in API instead of pretty names.

This commit is contained in:
evazion
2017-04-30 01:29:21 -05:00
parent b6e1958917
commit 7ade3b6831
6 changed files with 6 additions and 6 deletions

View File

@@ -147,7 +147,7 @@
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"));
tags.push("user:" + $post.attr("data-uploader").toLowerCase().replace(/ /g, "_"));
tags.push("user:" + $post.attr("data-uploader").toLowerCase());
$.each(String($post.data("flags")).match(/\S+/g) || [], function(i, v) {
tags.push("status:" + v);
});

View File

@@ -288,7 +288,7 @@
} else {
score = " score:" + $post.data("score");
}
$img.attr("title", $post.attr("data-tags") + " user:" + $post.attr("data-uploader") + " rating:" + $post.data("rating") + score);
$img.attr("title", $post.attr("data-tags") + " user:" + $post.attr("data-uploader").replace(/_/g, " ") + " rating:" + $post.data("rating") + score);
}
Danbooru.Post.initialize_post_image_resize_links = function() {

View File

@@ -109,6 +109,6 @@ class ArtistVersion < ActiveRecord::Base
end
def updater_name
User.id_to_name(updater_id).tr("_", " ")
User.id_to_name(updater_id)
end
end

View File

@@ -124,7 +124,7 @@ class Note < ActiveRecord::Base
end
def creator_name
User.id_to_name(creator_id).tr("_", " ")
User.id_to_name(creator_id)
end
def update_post

View File

@@ -1000,7 +1000,7 @@ class Post < ActiveRecord::Base
end
def uploader_name
User.id_to_name(uploader_id).tr("_", " ")
User.id_to_name(uploader_id)
end
end

View File

@@ -166,7 +166,7 @@ class WikiPage < ActiveRecord::Base
end
def creator_name
User.id_to_name(creator_id).tr("_", " ")
User.id_to_name(creator_id)
end
def category_name