Merge "Fixed and normalized content-disposition for thumbs."
[lhc/web/wiklou.git] / includes / parser / ParserOptions.php
index 650a175..211fcd6 100644 (file)
@@ -105,6 +105,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
         */
@@ -216,6 +221,8 @@ class ParserOptions {
        function getMaxPPNodeCount()                { return $this->mMaxPPNodeCount; }
        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; }
@@ -301,6 +308,8 @@ class ParserOptions {
        function setMaxIncludeSize( $x )            { return wfSetVar( $this->mMaxIncludeSize, $x ); }
        function setMaxPPNodeCount( $x )            { return wfSetVar( $this->mMaxPPNodeCount, $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 +404,7 @@ class ParserOptions {
                global $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages,
                        $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion,
                        $wgMaxArticleSize, $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth,
-                       $wgCleanSignatures, $wgExternalLinkTarget;
+                       $wgCleanSignatures, $wgExternalLinkTarget, $wgExpensiveParserFunctionLimit;
 
                wfProfileIn( __METHOD__ );
 
@@ -409,6 +418,7 @@ class ParserOptions {
                $this->mMaxPPNodeCount = $wgMaxPPNodeCount;
                $this->mMaxPPExpandDepth = $wgMaxPPExpandDepth;
                $this->mMaxTemplateDepth = $wgMaxTemplateDepth;
+               $this->mExpensiveParserFunctionLimit = $wgExpensiveParserFunctionLimit;
                $this->mCleanSignatures = $wgCleanSignatures;
                $this->mExternalLinkTarget = $wgExternalLinkTarget;