diff options
Diffstat (limited to 'includes/parser/ParserOutput.php')
-rw-r--r-- | includes/parser/ParserOutput.php | 10 |
1 files changed, 10 insertions, 0 deletions
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 <head> 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(); |