From: umherirrender Date: Sat, 5 Nov 2016 09:36:52 +0000 (+0100) Subject: Let findHooks.php find UserCreateForm/UserLoginForm X-Git-Tag: 1.31.0-rc.0~4929^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=565668376998b16ef9b5442e3d41cc91a22cf78f;p=lhc%2Fweb%2Fwiklou.git Let findHooks.php find UserCreateForm/UserLoginForm To make findHooks.php happy the hooks must be explicit called with Hooks::run, passing the name with a variable makes it impossible to detect and therefore the script unhappy. In case of B/C this is should be a possible solution. Change-Id: Iaf4d325a3821e09a742d23a3a5bca8493965bfb8 --- diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 984e32bdb1..c4e1f178fb 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -763,10 +763,18 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { $wgAuth->modifyUITemplate( $template, $action ); $oldTemplate = $template; - $hookName = $this->isSignup() ? 'UserCreateForm' : 'UserLoginForm'; - Hooks::run( $hookName, [ &$template ] ); - if ( $oldTemplate !== $template ) { - wfDeprecated( "reference in $hookName hook", '1.27' ); + + // Both Hooks::run are explicit here to make findHooks.php happy + if ( $this->isSignup() ) { + Hooks::run( 'UserCreateForm', [ &$template ] ); + if ( $oldTemplate !== $template ) { + wfDeprecated( "reference in UserCreateForm hook", '1.27' ); + } + } else { + Hooks::run( 'UserLoginForm', [ &$template ] ); + if ( $oldTemplate !== $template ) { + wfDeprecated( "reference in UserLoginForm hook", '1.27' ); + } } return $template;