Merge "Improve WikiMap::getWikiReferenceFromWgConf()"
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchanges.php
index b93fb4e..d4fb72c 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup SpecialPage
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * A special page that lists last changes made to the wiki
  *
@@ -308,7 +310,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
        /**
         * Build and output the actual changes list.
         *
-        * @param array $rows Database rows
+        * @param ResultWrapper $rows Database rows
         * @param FormOptions $opts
         */
        public function outputChangesList( $rows, $opts ) {
@@ -355,7 +357,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                        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 )
                                                );
                                }
@@ -792,4 +794,9 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
        public function isIncludable() {
                return true;
        }
+
+       protected function getCacheTTL() {
+               return 60 * 5;
+       }
+
 }