Merge "Apply the pseudo-css selector rules to diff and changelist pages"
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 5b939ef..8a48aa6 100644 (file)
@@ -42,6 +42,7 @@ class SpecialContributions extends IncludableSpecialPage {
                $out = $this->getOutput();
                // Modules required for viewing the list of contributions (also when included on other pages)
                $out->addModuleStyles( [
+                       'mediawiki.interface.helpers.styles',
                        'mediawiki.special',
                        'mediawiki.special.changeslist',
                ] );
@@ -152,6 +153,15 @@ class SpecialContributions extends IncludableSpecialPage {
                }
                $this->opts = ContribsPager::processDateFilter( $this->opts );
 
+               if ( $this->opts['namespace'] < NS_MAIN ) {
+                       $this->getOutput()->wrapWikiMsg(
+                               "<div class=\"mw-negative-namespace-not-supported error\">\n\$1\n</div>",
+                               [ 'negative-namespace-not-supported' ]
+                       );
+                       $out->addHTML( $this->getForm() );
+                       return;
+               }
+
                $feedType = $request->getVal( 'feed' );
 
                $feedParams = [