*
* @file
*/
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Linker\LinkTarget;
/**
* A query module to show basic page information.
* The prototype for a token function is func($pageid, $title)
* it should return a token or false (permission denied)
* @deprecated since 1.24
- * @return array Array(tokenname => function)
+ * @return array [ tokenname => function ]
*/
protected function getTokenFunctions() {
// Don't call the hooks twice
$this->watched = [];
$this->notificationtimestamps = [];
- $store = WatchedItemStore::getDefaultInstance();
+ $store = MediaWikiServices::getInstance()->getWatchedItemStore();
$timestamps = $store->getNotificationTimestampsBatch( $user, $this->everything );
if ( $this->fld_watched ) {
$countOptions['minimumWatchers'] = $unwatchedPageThreshold;
}
- $this->watchers = WatchedItemStore::getDefaultInstance()->countWatchersMultiple(
+ $this->watchers = MediaWikiServices::getInstance()->getWatchedItemStore()->countWatchersMultiple(
$this->everything,
$countOptions
);
)
);
}
-
- $this->visitingwatchers = WatchedItemStore::getDefaultInstance()->countVisitingWatchersMultiple(
+ $store = MediaWikiServices::getInstance()->getWatchedItemStore();
+ $this->visitingwatchers = $store->countVisitingWatchersMultiple(
$titlesWithThresholds,
!$canUnwatchedpages ? $unwatchedPageThreshold : null
);