mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
Use db schema for tags instead of plugin store and custom fields
This commit is contained in:
@ -77,8 +77,8 @@ module PrettyText
|
||||
|
||||
if !is_tag && category = Category.query_from_hashtag_slug(text)
|
||||
[category.url_with_id, text]
|
||||
elsif is_tag && tag = TopicCustomField.find_by(name: DiscourseTagging::TAGS_FIELD_NAME, value: text.gsub!("#{tag_postfix}", ''))
|
||||
["#{Discourse.base_url}/tags/#{tag.value}", text]
|
||||
elsif is_tag && tag = Tag.find_by_name(text.gsub!("#{tag_postfix}", ''))
|
||||
["#{Discourse.base_url}/tags/#{tag.name}", text]
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
Reference in New Issue
Block a user