Make an empty "?action=" parameter default to "view"
[lhc/web/wiklou.git] / includes / actions / Action.php
index 8d11d90..f9840ad 100644 (file)
@@ -142,7 +142,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 ( !$context->canUseWikiPage() ) {
+               if ( $actionName === '' || !$context->canUseWikiPage() ) {
                        return 'view';
                }