(bug 2585) Return proper 404 code when pages don't exist
[lhc/web/wiklou.git] / includes / Article.php
index a0a0f8d..c2af9b2 100644 (file)
@@ -1461,6 +1461,7 @@ class Article {
 
                if ( !$wgUseValidation ) # Are we using article validation at all?
                {
+                       $wgOut->setStatusCode( 404 );
                        $wgOut->errorpage( "nosuchspecialpage", "nospecialpagetext" );
                        return ;
                }
@@ -2429,6 +2430,7 @@ class Article {
                $fname = 'Article::info';
 
                if ( !$wgAllowPageInfo ) {
+                       $wgOut->setStatusCode( 400 );
                        $wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' );
                        return;
                }