[3.0] Fix stat collection registration - #9641
Conversation
How about creating a |
|
That would work. The other side of the coin was its not really a maintenance task. The registration logic doesn't have a home since the action is fairly straightforward to dump out data, resulting in us not needing any sort of Stats.php or other file. The only benefit to a Stats.php file is to localize all the documentation about what is collected and the action just references the data to call. |
|
Sure,a Stats file could work too. |
|
Or even just a static method in Actions\Admin\ACP. If it's static, it can be called from wherever. Since the one place that the admin can interact with the stats settings after installation is via the ACP, it makes sense to put it there, too. |
|
I went with a dedicated file at the root. I've expanded the details and also did something we have done server-side (and still do): enabled checking that it's not a local forum, which saves a web fetch call. I also added a test forum URL on the server side that returns a success response for the requests, mostly as a placeholder should we want to do some testing. No plans for it currently. |
I realize as well we should do something about the calls to register stats being in 3 places.
I can't decide how it should proceed. It seems like something we should drop into Maintenance and then reference. Its typically only called from the installer. The acp and upgrader are less likely to call this.