- public function getKey( $article, $popts, $useOutdated = true ) {
- $dummy = null;
- return $this->getKeyReal( $article, $popts, $useOutdated, $dummy );
- }
-
- /**
- * Temporary internal function to allow accessing $usedOptions
- * @todo Merge this back to self::getKey() when ParserOptions::optionsHashPre30() is removed
- * @param WikiPage $article
- * @param ParserOptions $popts
- * @param bool $useOutdated (default true)
- * @param array &$usedOptions Don't use this, it will go away soon
- * @return bool|mixed|string
- */
- private function getKeyReal( $article, $popts, $useOutdated, &$usedOptions ) {
- global $wgCacheEpoch;
+ public function getKey( $article, $popts, $useOutdated = self::USE_ANYTHING ) {
+ if ( is_bool( $useOutdated ) ) {
+ $useOutdated = $useOutdated ? self::USE_ANYTHING : self::USE_CURRENT_ONLY;
+ }