From 370e83bb0dfd0c70de268c93bf07ad5ee0897192 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 15 Aug 2008 01:29:47 +0200 Subject: Update auf 1.13.0 --- includes/api/ApiQueryWatchlist.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'includes/api/ApiQueryWatchlist.php') diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 91a0c951..d17e83f6 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -31,8 +31,8 @@ if (!defined('MEDIAWIKI')) { /** * This query action allows clients to retrieve a list of recently modified pages * that are part of the logged-in user's watchlist. - * - * @addtogroup API + * + * @ingroup API */ class ApiQueryWatchlist extends ApiQueryGeneratorBase { @@ -50,7 +50,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { private $fld_ids = false, $fld_title = false, $fld_patrol = false, $fld_flags = false, $fld_timestamp = false, $fld_user = false, $fld_comment = false, $fld_sizes = false; - + private function run($resultPageSet = null) { global $wgUser, $wgDBtype; @@ -122,7 +122,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { 'recentchanges' )); - $userId = $wgUser->getID(); + $userId = $wgUser->getId(); $this->addWhere(array ( 'wl_namespace = rc_namespace', 'wl_title = rc_title', @@ -134,15 +134,15 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $this->addWhereRange('rc_timestamp', $dir, $start, $end); $this->addWhereFld('wl_namespace', $namespace); $this->addWhereIf('rc_this_oldid=page_latest', !$allrev); - + if (!is_null($show)) { $show = array_flip($show); /* Check for conflicting parameters. */ - if ((isset ($show['minor']) && isset ($show['!minor'])) - || (isset ($show['bot']) && isset ($show['!bot'])) + if ((isset ($show['minor']) && isset ($show['!minor'])) + || (isset ($show['bot']) && isset ($show['!bot'])) || (isset ($show['anon']) && isset ($show['!anon']))) { - + $this->dieUsage("Incorrect parameter - mutually exclusive values may not be supplied", 'show'); } @@ -155,7 +155,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $this->addWhereIf('rc_user != 0', isset ($show['!anon'])); } - + # This is an index optimization for mysql, as done in the Special:Watchlist page $this->addWhereIf("rc_timestamp > ''", !isset ($start) && !isset ($end) && $wgDBtype == 'mysql'); @@ -205,9 +205,9 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { if ($this->fld_ids) { $vals['pageid'] = intval($row->rc_cur_id); - $vals['revid'] = intval($row->rc_this_oldid); + $vals['revid'] = intval($row->rc_this_oldid); } - + if ($this->fld_title) ApiQueryBase :: addTitleInfo($vals, Title :: makeTitle($row->rc_namespace, $row->rc_title)); @@ -305,7 +305,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { 'end' => 'The timestamp to end enumerating.', 'namespace' => 'Filter changes to only the given namespace(s).', 'dir' => 'In which direction to enumerate pages.', - 'limit' => 'How many total pages to return per request.', + 'limit' => 'How many total results to return per request.', 'prop' => 'Which additional items to get (non-generator mode only).', 'show' => array ( 'Show only items that meet this criteria.', @@ -315,7 +315,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { } public function getDescription() { - return ''; + return "Get all recent changes to pages in the logged in user's watchlist"; } protected function getExamples() { @@ -329,7 +329,6 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryWatchlist.php 30222 2008-01-28 19:05:26Z catrope $'; + return __CLASS__ . ': $Id: ApiQueryWatchlist.php 37909 2008-07-22 13:26:15Z catrope $'; } } - -- cgit v1.2.2