Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/190748
Change subject: Removed obsolete "containsOldMagic" code
......................................................................
Removed obsolete "containsOldMagic" code
Change-Id: Id225347e0599a6f79b30b0793cce7d97daed46f2
---
M includes/OutputPage.php
M includes/parser/CacheTime.php
M includes/parser/ParserCache.php
M includes/parser/ParserOutput.php
M includes/poolcounter/PoolWorkArticleView.php
5 files changed, 2 insertions(+), 31 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/48/190748/1
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 5c146e4..4070822 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -196,12 +196,6 @@
// Parser related.
- /**
- * @var int
- * @todo Unused?
- */
- private $mContainsOldMagic = 0;
-
/** @var int */
protected $mContainsNewMagic = 0;
diff --git a/includes/parser/CacheTime.php b/includes/parser/CacheTime.php
index e382cf3..950c0d4 100644
--- a/includes/parser/CacheTime.php
+++ b/includes/parser/CacheTime.php
@@ -35,7 +35,6 @@
public $mVersion = Parser::VERSION, # Compatibility check
$mCacheTime = '', # Time when this object was
generated, or -1 for uncacheable. Used in ParserCache.
$mCacheExpiry = null, # Seconds after which the object
should expire, use 0 for uncacheable. Used in ParserCache.
- $mContainsOldMagic, # Boolean variable indicating if
the input contained variables like {{CURRENTDAY}}
$mCacheRevisionId = null; # Revision ID that was parsed
/**
@@ -43,21 +42,6 @@
*/
public function getCacheTime() {
return wfTimestamp( TS_MW, $this->mCacheTime );
- }
-
- /**
- * @return bool
- */
- public function containsOldMagic() {
- return $this->mContainsOldMagic;
- }
-
- /**
- * @param bool $com
- * @return bool
- */
- public function setContainsOldMagic( $com ) {
- return wfSetVar( $this->mContainsOldMagic, $com );
}
/**
@@ -131,10 +115,6 @@
$expire = $wgParserCacheExpireTime;
} else {
$expire = min( $expire, $wgParserCacheExpireTime );
- }
-
- if ( $this->containsOldMagic() ) { //compatibility hack
- $expire = min( $expire, 3600 ); # 1 hour
}
if ( $expire <= 0 ) {
diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php
index ad131f4..bc8e4a6 100644
--- a/includes/parser/ParserCache.php
+++ b/includes/parser/ParserCache.php
@@ -257,8 +257,6 @@
$optionsKey->setCacheRevisionId( $revId );
$parserOutput->setCacheRevisionId( $revId );
- $optionsKey->setContainsOldMagic(
$parserOutput->containsOldMagic() );
-
$parserOutputKey = $this->getParserOutputKey( $page,
$popts->optionsHash( $optionsKey->mUsedOptions,
$page->getTitle() ) );
diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php
index e9e72be..9446574 100644
--- a/includes/parser/ParserOutput.php
+++ b/includes/parser/ParserOutput.php
@@ -64,12 +64,11 @@
'#<(?:mw:)?editsection page="(.*?)"
section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#';
public function __construct( $text = '', $languageLinks = array(),
$categoryLinks = array(),
- $containsOldMagic = false, $titletext = ''
+ $unused = false, $titletext = ''
) {
$this->mText = $text;
$this->mLanguageLinks = $languageLinks;
$this->mCategories = $categoryLinks;
- $this->mContainsOldMagic = $containsOldMagic;
$this->mTitleText = $titletext;
}
diff --git a/includes/poolcounter/PoolWorkArticleView.php
b/includes/poolcounter/PoolWorkArticleView.php
index da20f94..2c67b56 100644
--- a/includes/poolcounter/PoolWorkArticleView.php
+++ b/includes/poolcounter/PoolWorkArticleView.php
@@ -154,7 +154,7 @@
// Make sure file cache is not used on uncacheable content.
// Output that has magic words in it can still use the parser
cache
// (if enabled), though it will generally expire sooner.
- if ( !$this->parserOutput->isCacheable() ||
$this->parserOutput->containsOldMagic() ) {
+ if ( !$this->parserOutput->isCacheable() ) {
$wgUseFileCache = false;
}
--
To view, visit https://gerrit.wikimedia.org/r/190748
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id225347e0599a6f79b30b0793cce7d97daed46f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits