Merge "Allow users with deleterevision but not deletedhistory to delete revisions"
[lhc/web/wiklou.git] / includes / actions / Action.php
index ae4c6d6..f06f828 100644 (file)
@@ -88,7 +88,7 @@ abstract class Action {
         * @since 1.17
         * @param string $action
         * @param Page $page
-        * @param IContextSource $context
+        * @param IContextSource|null $context
         * @return Action|bool|null False if the action is disabled, null
         *     if it is not recognised
         */
@@ -147,7 +147,7 @@ abstract class Action {
                // Trying to get a WikiPage for NS_SPECIAL etc. will result
                // in WikiPage::factory throwing "Invalid or virtual namespace -1 given."
                // For SpecialPages et al, default to action=view.
-               if ( $actionName === '' || !$context->canUseWikiPage() ) {
+               if ( !$context->canUseWikiPage() ) {
                        return 'view';
                }
 
@@ -264,7 +264,7 @@ abstract class Action {
         * Only public since 1.21
         *
         * @param Page $page
-        * @param IContextSource $context
+        * @param IContextSource|null $context
         */
        public function __construct( Page $page, IContextSource $context = null ) {
                if ( $context === null ) {