Drop UnknownAction, deprecated in 1.19(!)
authorJames D. Forrester <jforrester@wikimedia.org>
Wed, 10 Oct 2018 23:17:28 +0000 (16:17 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Wed, 10 Oct 2018 23:17:28 +0000 (16:17 -0700)
Change-Id: Ia75552e69c07f6dc5da2f1e04ea813c912b04aef

RELEASE-NOTES-1.32
docs/hooks.txt
includes/MediaWiki.php
includes/actions/Action.php

index 6a005a0..bff52e5 100644 (file)
@@ -345,6 +345,7 @@ because of Phabricator reports.
 * The hook 'UserGetImplicitGroups', deprecated since 1.25, has been removed.
 * The global function wfRunHooks, deprecated since 1.25, has now been removed.
   Use Hooks::run().
+* The hook 'UnknownAction', deprecated since 1.19, has now been removed.
 
 === Deprecations in 1.32 ===
 * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit
index 9757a7e..0641e88 100644 (file)
@@ -3560,12 +3560,6 @@ Since 1.24: Paths pointing to a directory will be recursively scanned for
 test case files matching the suffix "Test.php".
 &$paths: list of test cases and directories to search.
 
-'UnknownAction': DEPRECATED since 1.19! To add an action in an extension,
-create a subclass of Action, and add a new key to $wgActions.
-An unknown "action" has occurred (useful for defining your own actions).
-$action: action name
-$article: article "acted on"
-
 'UnwatchArticle': Before a watch is removed from an article.
 &$user: user watching
 &$page: WikiPage object to be removed
index 4636ba3..bc57637 100644 (file)
@@ -501,18 +501,10 @@ class MediaWiki {
                        $action->show();
                        return;
                }
-               // NOTE: deprecated hook. Add to $wgActions instead
-               if ( Hooks::run(
-                       'UnknownAction',
-                       [
-                               $request->getVal( 'action', 'view' ),
-                               $page
-                       ],
-                       '1.19'
-               ) ) {
-                       $output->setStatusCode( 404 );
-                       $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
-               }
+
+               // If we've not found out which action it is by now, it's unknown
+               $output->setStatusCode( 404 );
+               $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
        }
 
        /**
index fb761a7..e5233f0 100644 (file)
@@ -30,7 +30,7 @@ use MediaWiki\MediaWikiServices;
  * are distinct from Special Pages because an action must apply to exactly one page.
  *
  * To add an action in an extension, create a subclass of Action, and add the key to
- * $wgActions.  There is also the deprecated UnknownAction hook
+ * $wgActions.
  *
  * Actions generally fall into two groups: the show-a-form-then-do-something-with-the-input
  * format (protect, delete, move, etc), and the just-do-something format (watch, rollback,