Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git] / includes / parser / Parser.php
index 977aebe..677da63 100644 (file)
@@ -511,7 +511,7 @@ class Parser {
                        }
                        $limitReport .= 'Cached time: ' . $this->mOutput->getCacheTime() . "\n";
                        $limitReport .= 'Cache expiry: ' . $this->mOutput->getCacheExpiry() . "\n";
-                       $limitReport .= 'Dynanmic content: ' . ( $this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
+                       $limitReport .= 'Dynamic content: ' . ( $this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n";
                        foreach ( $this->mOutput->getLimitReportData() as $key => $value ) {
                                if ( Hooks::run( 'ParserLimitReportFormat',
                                        array( $key, &$value, &$limitReport, false, false )
@@ -1283,8 +1283,6 @@ class Parser {
         * @return string
         */
        private function internalParseHalfParsed( $text, $isMain = true, $linestart = true ) {
-               global $wgUseTidy, $wgAlwaysUseTidy;
-
                $text = $this->mStripState->unstripGeneral( $text );
 
                if ( $isMain ) {
@@ -1335,7 +1333,7 @@ class Parser {
 
                $text = Sanitizer::normalizeCharReferences( $text );
 
-               if ( ( $wgUseTidy && $this->mOptions->getTidy() ) || $wgAlwaysUseTidy ) {
+               if ( MWTidy::isEnabled() && $this->mOptions->getTidy() ) {
                        $text = MWTidy::tidy( $text );
                } else {
                        # attempt to sanitize at least some nesting problems
@@ -3326,7 +3324,8 @@ class Parser {
         */
        public function replaceVariables( $text, $frame = false, $argsOnly = false ) {
                # Is there any text? Also, Prevent too big inclusions!
-               if ( strlen( $text ) < 1 || strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) {
+               $textSize = strlen( $text );
+               if ( $textSize < 1 || $textSize > $this->mOptions->getMaxIncludeSize() ) {
                        return $text;
                }