Parser: Emit deprecation warnings for ParserLimitReport hook
[lhc/web/wiklou.git] / includes / parser / Parser.php
index 11392de..5256733 100644 (file)
@@ -550,7 +550,8 @@ class Parser {
                        // Since we're not really outputting HTML, decode the entities and
                        // then re-encode the things that need hiding inside HTML comments.
                        $limitReport = htmlspecialchars_decode( $limitReport );
-                       Hooks::run( 'ParserLimitReport', [ $this, &$limitReport ] );
+                       // Run deprecated hook
+                       Hooks::run( 'ParserLimitReport', [ $this, &$limitReport ], '1.22' );
 
                        // Sanitize for comment. Note '‐' in the replacement is U+2010,
                        // which looks much like the problematic '-'.
@@ -4400,7 +4401,6 @@ class Parser {
                        $toc = Linker::tocList( $toc, $this->mOptions->getUserLangObj() );
                        $this->mOutput->setTOCHTML( $toc );
                        $toc = self::TOC_START . $toc . self::TOC_END;
-                       $this->mOutput->addModules( 'mediawiki.toc' );
                }
 
                if ( $isMain ) {
@@ -4975,6 +4975,7 @@ class Parser {
 
                $ig->setContextTitle( $this->mTitle );
                $ig->setShowBytes( false );
+               $ig->setShowDimensions( false );
                $ig->setShowFilename( false );
                $ig->setParser( $this );
                $ig->setHideBadImages();