X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialEditWatchlist.php;h=717edc3b05c56e953381e6d6d3619d0d2b22bed0;hb=4fe1735ba32b11ab9115f36511508885045ebdb2;hp=b05c81ab1ac26310caafb8d2f634522141e9ba72;hpb=2f3931d5e7258de93e72b4c6220dfbb350a70379;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index b05c81ab1a..717edc3b05 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -380,8 +380,9 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { */ protected function getWatchlistInfo() { $titles = []; + $services = MediaWikiServices::getInstance(); - $watchedItems = MediaWikiServices::getInstance()->getWatchedItemStore() + $watchedItems = $services->getWatchedItemStore() ->getWatchedItemsForUser( $this->getUser(), [ 'sort' => WatchedItemStore::SORT_ASC ] ); $lb = new LinkBatch(); @@ -390,7 +391,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { $namespace = $watchedItem->getLinkTarget()->getNamespace(); $dbKey = $watchedItem->getLinkTarget()->getDBkey(); $lb->add( $namespace, $dbKey ); - if ( !MWNamespace::isTalk( $namespace ) ) { + if ( !$services->getNamespaceInfo()->isTalk( $namespace ) ) { $titles[$namespace][$dbKey] = 1; } } @@ -511,6 +512,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { */ private function getExpandedTargets( array $targets ) { $expandedTargets = []; + $services = MediaWikiServices::getInstance(); foreach ( $targets as $target ) { if ( !$target instanceof LinkTarget ) { try { @@ -523,8 +525,10 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { $ns = $target->getNamespace(); $dbKey = $target->getDBkey(); - $expandedTargets[] = new TitleValue( MWNamespace::getSubject( $ns ), $dbKey ); - $expandedTargets[] = new TitleValue( MWNamespace::getTalk( $ns ), $dbKey ); + $expandedTargets[] = + new TitleValue( $services->getNamespaceInfo()->getSubject( $ns ), $dbKey ); + $expandedTargets[] = + new TitleValue( $services->getNamespaceInfo()->getTalk( $ns ), $dbKey ); } return $expandedTargets; } @@ -635,6 +639,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { $linkRenderer = $this->getLinkRenderer(); $link = $linkRenderer->makeLink( $title ); + $tools = []; $tools['talk'] = $linkRenderer->makeLink( $title->getTalkPage(), $this->msg( 'talkpagelinktext' )->text()