From f3dbb9ce931dc534dfd6c1cec56fcf9ccdafb3bc Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Tue, 2 Jul 2019 14:30:39 -0700 Subject: [PATCH] Drop ChangePasswordForm hook, deprecated in 1.27 Change-Id: Ia9281596e0d620b360ccd6cb7392d9516b9240b8 --- RELEASE-NOTES-1.34 | 2 ++ docs/hooks.txt | 6 ------ .../specials/SpecialChangeCredentials.php | 21 ------------------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 4d643d1063..be24b50c62 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -270,6 +270,8 @@ because of Phabricator reports. * Previously, when iterating ResultWrapper with foreach() or a similar construct, the range of the index was 1..numRows. This has been fixed to be 0..(numRows-1). +* The ChangePasswordForm hook, deprecated in 1.27, has been removed. Use the + AuthChangeFormFields hook or security levels instead. * … === Deprecations in 1.34 === diff --git a/docs/hooks.txt b/docs/hooks.txt index 1e5072f003..80453f48c6 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -944,12 +944,6 @@ No return data is accepted; this hook is for auditing only. $req: AuthenticationRequest object describing the change (and target user) $status: StatusValue with the result of the action -'ChangePasswordForm': DEPRECATED since 1.27! Use AuthChangeFormFields or -security levels. For extensions that need to add a field to the ChangePassword -form via the Preferences form. -&$extraFields: An array of arrays that hold fields like would be passed to the - pretty function. - 'ChangesListInitRows': Batch process change list rows prior to rendering. $changesList: ChangesList instance $rows: The data that will be rendered. May be a \Wikimedia\Rdbms\IResultWrapper diff --git a/includes/specials/SpecialChangeCredentials.php b/includes/specials/SpecialChangeCredentials.php index f899d76a35..6841cc5950 100644 --- a/includes/specials/SpecialChangeCredentials.php +++ b/includes/specials/SpecialChangeCredentials.php @@ -49,27 +49,6 @@ class SpecialChangeCredentials extends AuthManagerSpecialPage { return $params; } - public function onAuthChangeFormFields( - array $requests, array $fieldInfo, array &$formDescriptor, $action - ) { - // This method is never called for remove actions. - - $extraFields = []; - Hooks::run( 'ChangePasswordForm', [ &$extraFields ], '1.27' ); - foreach ( $extraFields as $extra ) { - list( $name, $label, $type, $default ) = $extra; - $formDescriptor[$name] = [ - 'type' => $type, - 'name' => $name, - 'label-message' => $label, - 'default' => $default, - ]; - - } - - return parent::onAuthChangeFormFields( $requests, $fieldInfo, $formDescriptor, $action ); - } - public function execute( $subPage ) { $this->setHeaders(); $this->outputHeader(); -- 2.20.1