Not a bug Skip session report counts if reports are sent to forum (save a query)

AlexT

Well-known member
You can save an unneeded query or two when reports are sent to a report forum rather than using the built-in report system. Specifically,

XenForo_ControllerPublic_Abstract->_updateModeratorSessionReportCounts() should check if XenForo_Application::getOptions()->reportIntoForumId is set, and if it is, avoid calling rebuildReportCountCache() and/or getActiveReportsCountsForUser().

Edit: Or alternatively one could do the necessary check within the Report model.
 
Last edited:
Nevermind, just discovered that the reportCounts cache wouldn't get updated anymore once you switch to the forum system, meaning it won't get stale and no further queries will be made.
 
Back
Top Bottom