From e638ea42959ff2c05bedc3d8713a18f2f99623a2 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 24 Oct 2005 02:41:54 +0000 Subject: [PATCH] Reverting fix for 2585; some users report seeing error displays of some kind with some versions of MSIE (unable to reproduce here). --- RELEASE-NOTES | 1 - includes/Article.php | 2 -- index.php | 8 -------- 3 files changed, 11 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b7d93af57e..1a3eb05819 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -144,7 +144,6 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 3617) Update for portuguese language (pt) * Namespaces hacks on LanguagePl * New preferences design and reorganisation -* (bug 2585) Return proper 404 code when pages don't exist * (bug 3684) Fix typo in fatal error backtraces in Hooks.php * (bug 3682) LanguageSr.php - added convertPlural * (bug 3694) LanguageTr.php update diff --git a/includes/Article.php b/includes/Article.php index 09c1ea8de8..df9589c34b 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1451,7 +1451,6 @@ class Article { if ( !$wgUseValidation ) # Are we using article validation at all? { - $wgOut->setStatusCode( 404 ); $wgOut->errorpage( "nosuchspecialpage", "nospecialpagetext" ); return ; } @@ -2420,7 +2419,6 @@ class Article { $fname = 'Article::info'; if ( !$wgAllowPageInfo ) { - $wgOut->setStatusCode( 400 ); $wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' ); return; } diff --git a/index.php b/index.php index c8e0cd5bf4..d623ae27f3 100644 --- a/index.php +++ b/index.php @@ -112,7 +112,6 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) { wfSpecialSearch(); } else if( !$wgTitle or $wgTitle->getDBkey() == '' ) { $wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) ); - $wgOut->setStatusCode( 404 ); $wgOut->errorpage( 'badtitle', 'badtitletext' ); } else if ( $wgTitle->getInterwiki() != '' ) { if( $rdfrom = $wgRequest->getVal( 'rdfrom' ) ) { @@ -125,7 +124,6 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) { $wgOut->redirect( $url ); } else { $wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) ); - $wgOut->setStatusCode( 404 ); $wgOut->errorpage( 'badtitle', 'badtitletext' ); } } else if ( ( $action == 'view' ) && @@ -143,10 +141,6 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) { $wgTitle = Title::makeTitle( NS_IMAGE, $wgTitle->getDBkey() ); } - if ( !$wgTitle->exists() ) { - $wgOut->setStatusCode( 404 ); - } - $ns = $wgTitle->getNamespace(); // Namespace might change when using redirects @@ -172,7 +166,6 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) { } if ( in_array( $action, $wgDisabledActions ) ) { - $wgOut->setStatusCode( 404 ); $wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' ); } else { switch( $action ) { @@ -261,7 +254,6 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) { break; default: if (wfRunHooks('UnknownAction', array($action, $wgArticle))) { - $wgOut->setStatusCode( 404 ); $wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' ); } } -- 2.20.1