Drop ChangePasswordForm hook, deprecated in 1.27
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 2 Jul 2019 21:30:39 +0000 (14:30 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Fri, 12 Jul 2019 17:41:01 +0000 (10:41 -0700)
Change-Id: Ia9281596e0d620b360ccd6cb7392d9516b9240b8

RELEASE-NOTES-1.34
docs/hooks.txt
includes/specials/SpecialChangeCredentials.php

index 4d643d1..be24b50 100644 (file)
@@ -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 ===
index 1e5072f..80453f4 100644 (file)
@@ -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
index f899d76..6841cc5 100644 (file)
@@ -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();