From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/api/ApiQueryWatchlist.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'includes/api/ApiQueryWatchlist.php') diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 77ecb90a..ea56fcd9 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -24,11 +24,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - // Eclipse helper - will be ignored in production - require_once( 'ApiQueryBase.php' ); -} - /** * This query action allows clients to retrieve a list of recently modified pages * that are part of the logged-in user's watchlist. @@ -159,8 +154,8 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { // Check permissions. if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ) { - global $wgUser; - if ( !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) { + $user = $this->getUser(); + if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) { $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' ); } } @@ -438,7 +433,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { ) ); } - protected function getExamples() { + public function getExamples() { return array( 'api.php?action=query&list=watchlist', 'api.php?action=query&list=watchlist&wlprop=ids|title|timestamp|user|comment', -- cgit v1.2.3-54-g00ecf