posts: remove "repopulated 1 old tag" message.
Remove the "Repopulated 1 old tag" message. Show "Created 1 new tag" instead. The distinction between creating a brand new tag and repopulating an empty tag doesn't matter.
This commit is contained in:
@@ -1377,9 +1377,7 @@ class Post < ApplicationRecord
|
||||
|
||||
def added_tags_are_valid
|
||||
new_tags = added_tags.select(&:empty?)
|
||||
new_general_tags = new_tags.select(&:general?)
|
||||
new_artist_tags = new_tags.select(&:artist?)
|
||||
repopulated_tags = new_tags.select { |t| !t.general? && !t.meta? && (t.created_at < 1.hour.ago) }
|
||||
new_artist_tags, new_general_tags = new_tags.partition(&:artist?)
|
||||
|
||||
if new_general_tags.present?
|
||||
n = new_general_tags.size
|
||||
@@ -1387,12 +1385,6 @@ class Post < ApplicationRecord
|
||||
self.warnings[:base] << "Created #{n} new #{(n == 1) ? "tag" : "tags"}: #{tag_wiki_links.join(", ")}"
|
||||
end
|
||||
|
||||
if repopulated_tags.present?
|
||||
n = repopulated_tags.size
|
||||
tag_wiki_links = repopulated_tags.map { |tag| "[[#{tag.name}]]" }
|
||||
self.warnings[:base] << "Repopulated #{n} old #{(n == 1) ? "tag" : "tags"}: #{tag_wiki_links.join(", ")}"
|
||||
end
|
||||
|
||||
new_artist_tags.each do |tag|
|
||||
if tag.artist.blank?
|
||||
self.warnings[:base] << "Artist [[#{tag.name}]] requires an artist entry. \"Create new artist entry\":[/artists/new?artist%5Bname%5D=#{CGI.escape(tag.name)}]"
|
||||
|
||||
Reference in New Issue
Block a user