r93763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93762‎ | r93763 | r93764 >
Date:16:18, 2 August 2011
Author:reedy
Status:ok
Tags:
Comment:
Revert r93688 per Platonides
Modified paths:
  • /branches/wmf/1.17wmf1/includes/parser/Preprocessor_DOM.php (modified) (history)
  • /trunk/phase3/includes/parser/Preprocessor_DOM.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Preprocessor_DOM.php
@@ -956,12 +956,11 @@
957957 return $root;
958958 }
959959
960 - if ( is_object( $this->parser->mOptions ) && ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() )
961 - {
 960+ if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
962961 return '<span class="error">Node-count limit exceeded</span>';
963962 }
964963
965 - if ( is_object( $this->parser->mOptions ) && $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
 964+ if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
966965 return '<span class="error">Expansion depth limit exceeded</span>';
967966 }
968967 wfProfileIn( __METHOD__ );
Index: branches/wmf/1.17wmf1/includes/parser/Preprocessor_DOM.php
@@ -902,12 +902,12 @@
903903 return $root;
904904 }
905905
906 - if ( is_object( $this->parser->mOptions ) && ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() )
 906+ if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() )
907907 {
908908 return '<span class="error">Node-count limit exceeded</span>';
909909 }
910910
911 - if ( is_object( $this->parser->mOptions ) && $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
 911+ if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
912912 return '<span class="error">Expansion depth limit exceeded</span>';
913913 }
914914 wfProfileIn( __METHOD__ );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93688Commit Preprocessor_DOM live hacksreedy23:39, 1 August 2011

Status & tagging log