X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnwatchedpages.php;h=df57744b3ae3f4c6e29a55f0d0852258c3058c21;hb=97fc1ad55520dd2fbf5c7165bac9c701b7d8ed44;hp=b3ca006c71d0e07430f6c8d134e6e218152d88d3;hpb=59ebff658ce912c1b0e7ef8d8f9bfec5a4e17b39;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnwatchedpages.php b/includes/specials/SpecialUnwatchedpages.php index b3ca006c71..df57744b3a 100644 --- a/includes/specials/SpecialUnwatchedpages.php +++ b/includes/specials/SpecialUnwatchedpages.php @@ -44,22 +44,22 @@ class UnwatchedpagesPage extends QueryPage { } public function getQueryInfo() { - return array( - 'tables' => array( 'page', 'watchlist' ), - 'fields' => array( + return [ + 'tables' => [ 'page', 'watchlist' ], + 'fields' => [ 'namespace' => 'page_namespace', 'title' => 'page_title', 'value' => 'page_namespace' - ), - 'conds' => array( + ], + 'conds' => [ 'wl_title IS NULL', 'page_is_redirect' => 0, "page_namespace != '" . NS_MEDIAWIKI . "'" - ), - 'join_conds' => array( 'watchlist' => array( - 'LEFT JOIN', array( 'wl_title = page_title', - 'wl_namespace = page_namespace' ) ) ) - ); + ], + 'join_conds' => [ 'watchlist' => [ + 'LEFT JOIN', [ 'wl_title = page_title', + 'wl_namespace = page_namespace' ] ] ] + ]; } function sortDescending() { @@ -67,7 +67,7 @@ class UnwatchedpagesPage extends QueryPage { } function getOrderFields() { - return array( 'page_namespace', 'page_title' ); + return [ 'page_namespace', 'page_title' ]; } /** @@ -89,19 +89,18 @@ class UnwatchedpagesPage extends QueryPage { $nt = Title::makeTitleSafe( $result->namespace, $result->title ); if ( !$nt ) { - return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ), + return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ], Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) ); } $text = $wgContLang->convert( $nt->getPrefixedText() ); $plink = Linker::linkKnown( $nt, htmlspecialchars( $text ) ); - $token = WatchAction::getWatchToken( $nt, $this->getUser() ); $wlink = Linker::linkKnown( $nt, $this->msg( 'watch' )->escaped(), - array( 'class' => 'mw-watch-link' ), - array( 'action' => 'watch', 'token' => $token ) + [ 'class' => 'mw-watch-link' ], + [ 'action' => 'watch' ] ); return $this->getLanguage()->specialList( $plink, $wlink );