DEV: Move about_stat_groups to DiscoursePluginRegistry (#20496)

Follow up to 098ab29d4150a5a39880d59ef6cad5f6795a18fd. Since
we just used a `cattr_reader` on `About` this was not safe
for multisite, since some sites could have the chat plugin
enabled and some may not. Using `DiscoursePluginRegistry` gets
around this issue, and makes it so the chat stats only show
for a site if `chat_enabled` is true.
This commit is contained in:
Martin Brennan
2023-03-02 08:10:16 +10:00
committed by GitHub
parent bb0ef4c7b4
commit e195e6f614
5 changed files with 43 additions and 35 deletions

View File

@ -108,6 +108,8 @@ class DiscoursePluginRegistry
define_filtered_register :search_groups_set_query_callbacks
define_filtered_register :about_stat_groups
def self.register_auth_provider(auth_provider)
self.auth_providers << auth_provider
end