X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnwatchedpages.php;h=bb07c1975918ff644e0d4900b7303d85e561ed05;hb=2c9194d02086a98ea457a88f3e897fd789dd90d9;hp=e5a79413f7f3e2885b7eb3a1c63607f1e6bde74e;hpb=ddfce8feb06afe46bfa778be27c5b5b369861f5e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnwatchedpages.php b/includes/specials/SpecialUnwatchedpages.php index e5a79413f7..bb07c19759 100644 --- a/includes/specials/SpecialUnwatchedpages.php +++ b/includes/specials/SpecialUnwatchedpages.php @@ -35,34 +35,53 @@ class UnwatchedpagesPage extends QueryPage { parent::__construct( $name, 'unwatchedpages' ); } - function isExpensive() { return true; } - function isSyndicated() { return false; } + function isExpensive() { + return true; + } + + function isSyndicated() { + return false; + } function getQueryInfo() { - return array ( - 'tables' => array ( 'page', 'watchlist' ), - 'fields' => array ( 'namespace' => 'page_namespace', - 'title' => 'page_title', - 'value' => 'page_namespace' ), - 'conds' => array ( 'wl_title IS NULL', - 'page_is_redirect' => 0, - "page_namespace != '" . NS_MEDIAWIKI . - "'" ), - 'join_conds' => array ( 'watchlist' => array ( - 'LEFT JOIN', array ( 'wl_title = page_title', + return array( + 'tables' => array( 'page', 'watchlist' ), + 'fields' => array( + 'namespace' => 'page_namespace', + 'title' => 'page_title', + 'value' => 'page_namespace' + ), + 'conds' => array( + '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' ) ) ) ); } - function sortDescending() { return false; } + function sortDescending() { + return false; + } function getOrderFields() { return array( 'page_namespace', 'page_title' ); } /** - * @param $skin Skin - * @param $result + * Add the JS + * @param string|null $par + */ + public function execute( $par ) { + parent::execute( $par ); + $this->getOutput()->addModules( 'mediawiki.special.unwatchedPages' ); + } + + /** + * @param Skin $skin + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { @@ -81,10 +100,14 @@ class UnwatchedpagesPage extends QueryPage { $wlink = Linker::linkKnown( $nt, $this->msg( 'watch' )->escaped(), - array(), + array( 'class' => 'mw-watch-link' ), array( 'action' => 'watch', 'token' => $token ) ); return $this->getLanguage()->specialList( $plink, $wlink ); } + + protected function getGroupName() { + return 'maintenance'; + } }