diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
commit | 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch) | |
tree | 577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/api/ApiQueryWatchlist.php | |
parent | cacc939b34e315b85e2d72997811eb6677996cc1 (diff) |
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/api/ApiQueryWatchlist.php')
-rw-r--r-- | includes/api/ApiQueryWatchlist.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index a1a33728..90b12c14 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -116,7 +116,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { ) ); $userId = $user->getId(); - $this->addJoinConds( array( 'watchlist' => array('INNER JOIN', + $this->addJoinConds( array( 'watchlist' => array( 'INNER JOIN', array( 'wl_user' => $userId, 'wl_namespace=rc_namespace', @@ -240,14 +240,16 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { if ( $this->fld_user || $this->fld_userid ) { - if ( $this->fld_user ) { - $vals['user'] = $row->rc_user_text; - } - if ( $this->fld_userid ) { + $vals['userid'] = $row->rc_user; + // for backwards compatibility $vals['user'] = $row->rc_user; } + if ( $this->fld_user ) { + $vals['user'] = $row->rc_user_text; + } + if ( !$row->rc_user ) { $vals['anon'] = ''; } @@ -511,15 +513,11 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { 'api.php?action=query&list=watchlist&wlallrev=&wlprop=ids|title|timestamp|user|comment', 'api.php?action=query&generator=watchlist&prop=info', 'api.php?action=query&generator=watchlist&gwlallrev=&prop=revisions&rvprop=timestamp|user', - 'api.php?action=query&list=watchlist&wlowner=Bob_Smith&wltoken=d8d562e9725ea1512894cdab28e5ceebc7f20237' + 'api.php?action=query&list=watchlist&wlowner=Bob_Smith&wltoken=123ABC' ); } public function getHelpUrls() { return 'https://www.mediawiki.org/wiki/API:Watchlist'; } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } |