jenkins-bot has submitted this change and it was merged.

Change subject: Let findHooks.php find UserCreateForm/UserLoginForm
......................................................................


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
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 12 insertions(+), 4 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index 984e32b..c4e1f17 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -763,10 +763,18 @@
                $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;

-- 
To view, visit https://gerrit.wikimedia.org/r/319976
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf4d325a3821e09a742d23a3a5bca8493965bfb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to