コード例 #1
0
ファイル: WikiPage.php プロジェクト: paladox/mediawiki
 /**
  * Should the parser cache be used?
  *
  * @param ParserOptions $parserOptions ParserOptions to check
  * @param int $oldId
  * @return bool
  */
 public function shouldCheckParserCache(ParserOptions $parserOptions, $oldId)
 {
     return $parserOptions->getStubThreshold() == 0 && $this->exists() && ($oldId === null || $oldId === 0 || $oldId === $this->getLatest()) && $this->getContentHandler()->isParserCacheSupported();
 }
コード例 #2
0
ファイル: WikiPage.php プロジェクト: nahoj/mediawiki_ynh
	/**
	 * Should the parser cache be used?
	 *
	 * @param $parserOptions ParserOptions to check
	 * @param $oldid int
	 * @return boolean
	 */
	public function isParserCacheUsed( ParserOptions $parserOptions, $oldid ) {
		global $wgEnableParserCache;

		return $wgEnableParserCache
			&& $parserOptions->getStubThreshold() == 0
			&& $this->exists()
			&& ( $oldid === null || $oldid === 0 || $oldid === $this->getLatest() )
			&& $this->getContentHandler()->isParserCacheSupported();
	}
コード例 #3
0
ファイル: WikiPage.php プロジェクト: seedbank/old-repo
 /**
  * Should the parser cache be used?
  *
  * @param $parserOptions ParserOptions to check
  * @param $oldid int
  * @return boolean
  */
 public function isParserCacheUsed(ParserOptions $parserOptions, $oldid)
 {
     global $wgEnableParserCache;
     return $wgEnableParserCache && $parserOptions->getStubThreshold() == 0 && $this->mTitle->exists() && ($oldid === null || $oldid === 0 || $oldid === $this->getLatest()) && $this->mTitle->isWikitextPage();
 }