mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
use named param in tag_topic_by_names
This commit is contained in:
parent
292dd8623c
commit
352f98d084
|
@ -4,7 +4,7 @@ module DiscourseTagging
|
||||||
TAGS_FILTER_REGEXP = /[\/\?#\[\]@!\$&'\(\)\*\+,;=\.%\\`^\s|\{\}"<>]+/ # /?#[]@!$&'()*+,;=.%\`^|{}"<>
|
TAGS_FILTER_REGEXP = /[\/\?#\[\]@!\$&'\(\)\*\+,;=\.%\\`^\s|\{\}"<>]+/ # /?#[]@!$&'()*+,;=.%\`^|{}"<>
|
||||||
|
|
||||||
|
|
||||||
def self.tag_topic_by_names(topic, guardian, tag_names_arg, append=false)
|
def self.tag_topic_by_names(topic, guardian, tag_names_arg, append: false)
|
||||||
if SiteSetting.tagging_enabled
|
if SiteSetting.tagging_enabled
|
||||||
tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, guardian) || []
|
tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, guardian) || []
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ class TopicsBulkAction
|
||||||
topics.each do |t|
|
topics.each do |t|
|
||||||
if guardian.can_edit?(t)
|
if guardian.can_edit?(t)
|
||||||
if tags.present?
|
if tags.present?
|
||||||
DiscourseTagging.tag_topic_by_names(t, guardian, tags, append=true)
|
DiscourseTagging.tag_topic_by_names(t, guardian, tags, append: true)
|
||||||
end
|
end
|
||||||
@changed_ids << t.id
|
@changed_ids << t.id
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user