Remove use of $wgUser in onMaintenanceRefreshLinksInit

For now, the hook handler isn't actually used (T248551) but
when it is at some point it shouldn't use $wgUser

Bug: T248550
Bug: T248551
Change-Id: I826e91411deb91bbd8c58147b32fda3f3e7ed6a8
This commit is contained in:
DannyS712 2020-09-27 01:02:10 +00:00
parent db617781c1
commit 3f16b9f1c2

View file

@ -280,10 +280,10 @@ class MathHooks {
* @return bool hook return code
*/
public static function onMaintenanceRefreshLinksInit( $maint ) {
global $wgUser;
$user = RequestContext::getMain()->getUser();
# Don't generate TeX PNGs (the lack of a sensible current directory causes errors anyway)
$wgUser->setOption( 'math', 'source' );
$user->setOption( 'math', 'source' );
return true;
}