From: Tim Starling Date: Sun, 12 Oct 2008 13:28:04 +0000 (+0000) Subject: Reverted r41655. Causes a text load on parser cache hit. Reduces parser cache hit... X-Git-Tag: 1.31.0-rc.0~44781 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=c50668c0e8c16ffd82d5e1bcfe38877a18879c85;p=lhc%2Fweb%2Fwiklou.git Reverted r41655. Causes a text load on parser cache hit. Reduces parser cache hit performance especially for ES clusters. Messages not reverted on the assumption that this revert is temporary. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c668d2dded..7469a19d14 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -148,11 +148,6 @@ The following extensions are migrated into MediaWiki 1.14: $wgExternalLinkTarget * api.php now sends "Retry-After" and "X-Database-Lag" HTTP headers if the maxlag check fails, just like index.php does -* Configurable per-namespace and per-page header, respectively - MediaWiki:Pageheader-# where # is the namespace number, and - MediaWiki:Pagenumber-#-PAGENAME where # is the page's namespace number and - PAGENAME is the page name minus the namespace prefix. Can be disabled with - the new magic word __NOHEADER__ * Added "link" parameter to image links, to allow images to link to an arbitrary title or URL. This should replace inaccessible and incomplete solutions such as CSS-based overlays and ImageMap. diff --git a/includes/Article.php b/includes/Article.php index a142d502bd..159ce7b7e7 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -796,32 +796,6 @@ class Article { $wasRedirected = true; } } - - # Optional notices on a per-namespace and per-page basis - $mw = MagicWord::get( 'noheader' ); - $ignoreheader = false; - $text = $this->getContent(); - if( $mw->match( $text ) ) { - $ignoreheader = true; - } - $pageheader_ns = 'pageheader-'.$this->mTitle->getNamespace(); - $pageheader_page = $pageheader_ns.'-'.$this->mTitle->getDBkey(); - if ( !wfEmptyMsg( $pageheader_ns, wfMsgForContent( $pageheader_ns ) ) && !$ignoreheader ) { - $wgOut->addWikiText( wfMsgForContent( $pageheader_ns ) ); - } - - if ( MWNamespace::hasSubpages( $this->mTitle->getNamespace() ) && !$ignoreheader ) { - $parts = explode( '/', $this->mTitle->getDBkey() ); - $pageheader_base = $pageheader_ns; - while ( count( $parts ) > 0 ) { - $pageheader_base .= '-'.array_shift( $parts ); - if ( !wfEmptyMsg( $pageheader_base, wfMsgForContent( $pageheader_base ) ) ) { - $wgOut->addWikiText( wfMsgForContent( $pageheader_base ) ); - } - } - } else if ( !wfEmptyMsg( $pageheader_page, wfMsgForContent( $pageheader_page ) ) && !$ignoreheader ) { - $wgOut->addWikiText( wfMsgForContent( $pageheader_page ) ); - } $outputDone = false; wfRunHooks( 'ArticleViewHeader', array( &$this, &$outputDone, &$pcache ) ); @@ -861,6 +835,7 @@ class Article { $wgOut->addHtml( '' ); } } + $text = $this->getContent(); if ( $text === false ) { # Failed to load, replace text with error message $t = $this->mTitle->getPrefixedText(); diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 3f0888d4d3..594b2f443d 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -160,7 +160,6 @@ class MagicWord { 'index', 'noindex', 'staticredirect', - 'noheader', );