mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: adds a add_report method accessible in plugin.rb
This commit is contained in:
@ -92,6 +92,14 @@ class Plugin::Instance
|
||||
end
|
||||
end
|
||||
|
||||
def add_report(name, &block)
|
||||
reloadable_patch do |plugin|
|
||||
if plugin.enabled?
|
||||
Report.add_report(name, &block)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def replace_flags
|
||||
settings = ::FlagSettings.new
|
||||
yield settings
|
||||
|
Reference in New Issue
Block a user