* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
+
/**
* A special page that lists last changes made to the wiki
*
if ( $showWatcherCount && $obj->rc_namespace >= 0 ) {
if ( !isset( $watcherCache[$obj->rc_namespace][$obj->rc_title] ) ) {
$watcherCache[$obj->rc_namespace][$obj->rc_title] =
- WatchedItemStore::getDefaultInstance()->countWatchers(
+ MediaWikiServices::getInstance()->getWatchedItemStore()->countWatchers(
new TitleValue( (int)$obj->rc_namespace, $obj->rc_title )
);
}
public function isIncludable() {
return true;
}
+
+ /**
+ * How long to cache page when it is being included.
+ *
+ * @return int|bool Time in seconds, 0 to disable caching altogether
+ */
+ public function maxIncludeCacheTime() {
+ global $wgMiserMode;
+ if ( !$wgMiserMode ) {
+ return 0;
+ } else {
+ return 60*5;
+ }
+ }
+
}