From: Roan Kattouw Date: Wed, 17 Dec 2008 15:35:57 +0000 (+0000) Subject: Revert r44716 (added user,excludeuser to watchlist,recentchanges): can't commit this... X-Git-Tag: 1.31.0-rc.0~43909 X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=06a5efe4fa4221742cfe2712453f6982cb458fc2;p=lhc%2Fweb%2Fwiklou.git Revert r44716 (added user,excludeuser to watchlist,recentchanges): can't commit this just yet because not all WMF servers have the user_text index just yet, see also bug 14200 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0eea0dd3a3..a0524ca225 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index e00871e53a..c65c3529fd 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -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 ( diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index e09cd9d030..a70ea49730 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -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).',