mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06: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. |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
generator | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
migrations | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |