From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/parser/ParserOutput.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'includes/parser/ParserOutput.php') diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 35cb5c92..22c1dfba 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -18,6 +18,7 @@ class ParserOutput $mImages = array(), # DB keys of the images used, in the array key only $mExternalLinks = array(), # External link URLs, in the key only $mNewSection = false, # Show a new section link? + $mHideNewSection = false, # Hide the new section link? $mNoGallery = false, # No gallery on category page? (__NOGALLERY__) $mHeadItems = array(), # Items to put in the section $mOutputHooks = array(), # Hook tags as per $wgParserOutputHooks @@ -80,6 +81,12 @@ class ParserOutput function setNewSection( $value ) { $this->mNewSection = (bool)$value; } + function hideNewSection ( $value ) { + $this->mHideNewSection = (bool)$value; + } + function getHideNewSection () { + return (bool)$this->mHideNewSection; + } function getNewSection() { return (bool)$this->mNewSection; } @@ -94,6 +101,9 @@ class ParserOutput // We don't record Special: links currently // It might actually be wise to, but we'd need to do some normalization. return; + } elseif( $dbk === '' ) { + // Don't record self links - [[#Foo]] + return; } if ( !isset( $this->mLinks[$ns] ) ) { $this->mLinks[$ns] = array(); -- cgit v1.2.3-54-g00ecf