Revert r44716 (added user,excludeuser to watchlist,recentchanges): can't commit this...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 17 Dec 2008 15:35:57 +0000 (15:35 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 17 Dec 2008 15:35:57 +0000 (15:35 +0000)
RELEASE-NOTES
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryWatchlist.php

index 0eea0dd..a0524ca 100644 (file)
@@ -530,10 +530,7 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 16647) list=allcategories, prop=categories don't return "hidden"
   property for hidden categories
 * New siprop parameter of 'extensions' to list all installed extensions
-* (bug 16672) Include canonical namespace name in
-  meta=siteinfo&siprop=namespaces. 
-* (bug 16527) Added user and excludeuser parameters to list=watchlist and
-  list=recentchanges
+* (bug 16672) Include canonical namespace name in meta=siteinfo&siprop=namespaces. 
 
 === Languages updated in 1.14 ===
 
index e00871e..c65c352 100644 (file)
@@ -84,7 +84,7 @@ class ApiQueryRecentChanges extends ApiQueryBase {
         */
        public function execute() {
                /* Initialize vars */
-               $limit = $prop = $namespace = $titles = $user = $excludeuser = $show = $type = $dir = $start = $end = $token = null;
+               $limit = $prop = $namespace = $titles = $show = $type = $dir = $start = $end = $token = null;
 
                /* Get the parameters of the request. */
                extract($this->extractRequestParams());
@@ -154,15 +154,8 @@ class ApiQueryRecentChanges extends ApiQueryBase {
                        // Don't throw log entries out the window here
                        $this->addWhereIf('page_is_redirect = 0 OR page_is_redirect IS NULL', isset ($show['!redirect']));
                }
-               
-               if(!is_null($user) && !is_null($excludeuser))
-                       $this->dieUsage('user and excludeuser cannot be used together', 'badparams');
-               if(!is_null($user))
-                       $this->addWhereFld('rc_user_text', $user);
-               if(!is_null($excludeuser))
-                       $this->addWhere('rc_user_text != ' . $this->getDB()->addQuotes($excludeuser));
-
-               /* Add the fields we're concerned with to our query. */
+
+               /* Add the fields we're concerned with to out query. */
                $this->addFields(array (
                        'rc_timestamp',
                        'rc_namespace',
@@ -404,12 +397,6 @@ class ApiQueryRecentChanges extends ApiQueryBase {
                        'titles' => array(
                                ApiBase :: PARAM_ISMULTI => true
                        ),
-                       'user' => array(
-                               ApiBase :: PARAM_TYPE => 'user'
-                       ),
-                       'excludeuser' => array(
-                               ApiBase :: PARAM_TYPE => 'user'
-                       ),
                        'prop' => array (
                                ApiBase :: PARAM_ISMULTI => true,
                                ApiBase :: PARAM_DFLT => 'title|timestamp|ids',
@@ -470,8 +457,6 @@ class ApiQueryRecentChanges extends ApiQueryBase {
                        'dir' => 'In which direction to enumerate.',
                        'namespace' => 'Filter log entries to only this namespace(s)',
                        'titles' => 'Filter log entries to only these page titles',
-                       'user' => 'Only list changes by this user',
-                       'excludeuser' => 'Don\'t list changes by this user',
                        'prop' => 'Include additional pieces of information',
                        'token' => 'Which tokens to obtain for each change',
                        'show' => array (
index e09cd9d..a70ea49 100644 (file)
@@ -59,7 +59,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                if (!$wgUser->isLoggedIn())
                        $this->dieUsage('You must be logged-in to have a watchlist', 'notloggedin');
 
-               $allrev = $start = $end = $namespace = $user = $excludeuser = $dir = $limit = $prop = $show = null;
+               $allrev = $start = $end = $namespace = $dir = $limit = $prop = $show = null;
                extract($this->extractRequestParams());
 
                if (!is_null($prop) && is_null($resultPageSet)) {
@@ -162,13 +162,6 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        $this->addWhereIf('rc_patrolled = 0', isset($show['!patrolled']));
                        $this->addWhereIf('rc_patrolled != 0', isset($show['patrolled']));                      
                }
-               
-               if(!is_null($user) && !is_null($excludeuser))
-                       $this->dieUsage('user and excludeuser cannot be used together', 'badparams');
-               if(!is_null($user))
-                       $this->addWhereFld('rc_user_text', $user);
-               if(!is_null($excludeuser))
-                       $this->addWhere('rc_user_text != ' . $this->getDB()->addQuotes($excludeuser));
 
 
                # This is an index optimization for mysql, as done in the Special:Watchlist page
@@ -271,12 +264,6 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                                ApiBase :: PARAM_ISMULTI => true,
                                ApiBase :: PARAM_TYPE => 'namespace'
                        ),
-                       'user' => array(
-                               ApiBase :: PARAM_TYPE => 'user',
-                       ),
-                       'excludeuser' => array(
-                               ApiBase :: PARAM_TYPE => 'user',
-                       ),
                        'dir' => array (
                                ApiBase :: PARAM_DFLT => 'older',
                                ApiBase :: PARAM_TYPE => array (
@@ -327,8 +314,6 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        'start' => 'The timestamp to start enumerating from.',
                        'end' => 'The timestamp to end enumerating.',
                        'namespace' => 'Filter changes to only the given namespace(s).',
-                       'user' => 'Only list changes by this user',
-                       'excludeuser' => 'Don\'t list changes by this user',
                        'dir' => 'In which direction to enumerate pages.',
                        'limit' => 'How many total results to return per request.',
                        'prop' => 'Which additional items to get (non-generator mode only).',