Merge "(bug 40257) action=info no longer shows subpages where disabled"
[lhc/web/wiklou.git] / includes / parser / ParserOptions.php
index 650a175..ff9f7ef 100644 (file)
@@ -94,6 +94,11 @@ class ParserOptions {
         * Maximum number of nodes touched by PPFrame::expand()
         */
        var $mMaxPPNodeCount;
+
+       /**
+        * Maximum number of nodes generated by Preprocessor::preprocessToObj()
+        */
+       var $mMaxGeneratedPPNodeCount;
        
        /**
         * Maximum recursion depth in PPFrame::expand()
@@ -105,6 +110,11 @@ class ParserOptions {
         */
        var $mMaxTemplateDepth;
        
+       /**
+        * Maximum number of calls per parse to expensive parser functions
+        */
+       var $mExpensiveParserFunctionLimit;
+       
        /**
         * Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS
         */
@@ -214,8 +224,11 @@ class ParserOptions {
        function getTargetLanguage()                { return $this->mTargetLanguage; }
        function getMaxIncludeSize()                { return $this->mMaxIncludeSize; }
        function getMaxPPNodeCount()                { return $this->mMaxPPNodeCount; }
+       function getMaxGeneratedPPNodeCount()       { return $this->mMaxGeneratedPPNodeCount; }
        function getMaxPPExpandDepth()              { return $this->mMaxPPExpandDepth; }
        function getMaxTemplateDepth()              { return $this->mMaxTemplateDepth; }
+       /* @since 1.20 */
+       function getExpensiveParserFunctionLimit()  { return $this->mExpensiveParserFunctionLimit; }
        function getRemoveComments()                { return $this->mRemoveComments; }
        function getTemplateCallback()              { return $this->mTemplateCallback; }
        function getEnableLimitReport()             { return $this->mEnableLimitReport; }
@@ -300,7 +313,10 @@ class ParserOptions {
        function setTargetLanguage( $x )            { return wfSetVar( $this->mTargetLanguage, $x, true ); }
        function setMaxIncludeSize( $x )            { return wfSetVar( $this->mMaxIncludeSize, $x ); }
        function setMaxPPNodeCount( $x )            { return wfSetVar( $this->mMaxPPNodeCount, $x ); }
+       function setMaxGeneratedPPNodeCount( $x )   { return wfSetVar( $this->mMaxGeneratedPPNodeCount, $x ); }
        function setMaxTemplateDepth( $x )          { return wfSetVar( $this->mMaxTemplateDepth, $x ); }
+       /* @since 1.20 */
+       function setExpensiveParserFunctionLimit( $x ) { return wfSetVar( $this->mExpensiveParserFunctionLimit, $x ); }
        function setRemoveComments( $x )            { return wfSetVar( $this->mRemoveComments, $x ); }
        function setTemplateCallback( $x )          { return wfSetVar( $this->mTemplateCallback, $x ); }
        function enableLimitReport( $x = true )     { return wfSetVar( $this->mEnableLimitReport, $x ); }
@@ -395,7 +411,8 @@ class ParserOptions {
                global $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages,
                        $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion,
                        $wgMaxArticleSize, $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth,
-                       $wgCleanSignatures, $wgExternalLinkTarget;
+                       $wgCleanSignatures, $wgExternalLinkTarget, $wgExpensiveParserFunctionLimit,
+                       $wgMaxGeneratedPPNodeCount;
 
                wfProfileIn( __METHOD__ );
 
@@ -407,8 +424,10 @@ class ParserOptions {
                $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion;
                $this->mMaxIncludeSize = $wgMaxArticleSize * 1024;
                $this->mMaxPPNodeCount = $wgMaxPPNodeCount;
+               $this->mMaxGeneratedPPNodeCount = $wgMaxGeneratedPPNodeCount;
                $this->mMaxPPExpandDepth = $wgMaxPPExpandDepth;
                $this->mMaxTemplateDepth = $wgMaxTemplateDepth;
+               $this->mExpensiveParserFunctionLimit = $wgExpensiveParserFunctionLimit;
                $this->mCleanSignatures = $wgCleanSignatures;
                $this->mExternalLinkTarget = $wgExternalLinkTarget;