mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 05:23:40 +08:00
5ec227334a
Currently, when a plugin registers a new reviewable type or extends a list method (through `register_reviewble_type` and `extend_list_method` respectively), the new array is statically computed and always returns the same value. It will continue to return the same value even if the plugin is disabled (it can be a problem in a multisite env too). To address this issue, this patch changes how `extend_list_method` works. It’s now using `DiscoursePluginRegistry.define_filtered_register` to create a register on the fly and store the extra values from various plugins. It then combines the original values with the ones from the registry. The registry is already aware of disabled plugins, so when a plugin is disabled, its registered values won’t be returned. |
||
---|---|---|
.. | ||
filter_manager.rb | ||
filter.rb | ||
instance.rb | ||
metadata.rb |