Update the old magic with new one.
authorPlatonides <platonides@users.mediawiki.org>
Mon, 19 Jul 2010 23:08:52 +0000 (23:08 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Mon, 19 Jul 2010 23:08:52 +0000 (23:08 +0000)
Not only should this have used setContainsOldMagic() instead of manually modifying the member,
the outdated magic reduced the caching time to one hour even if you just used something like
{{currentmonth}}, which is hinted to one day.

This is the only usage of old magic, we could remove it but perhaps it is used by some extension?

includes/parser/Parser.php

index 7371948..7d591b1 100644 (file)
@@ -3021,7 +3021,7 @@ class Parser {
                        if ( $id !== false ) {
                                $text = $this->getVariableValue( $id, $frame );
                                if ( MagicWord::getCacheTTL( $id ) > -1 ) {
-                                       $this->mOutput->mContainsOldMagic = true;
+                                       $this->mOutput->updateCacheExpiry( MagicWord::getCacheTTL( $id ) );
                                }
                                $found = true;
                        }