From: Roan Kattouw Date: Wed, 4 Feb 2009 22:51:36 +0000 (+0000) Subject: API: BREAKING CHANGE: Remove rctitles parameter from list=recentchanges for performan... X-Git-Tag: 1.31.0-rc.0~43043 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=ff45244744596d812b92ef5ec493d52aaddd2940;p=lhc%2Fweb%2Fwiklou.git API: BREAKING CHANGE: Remove rctitles parameter from list=recentchanges for performance reasons (requests using it time out on enwiki) --- diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 590cb26b1e..10436c47c7 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -97,25 +97,6 @@ class ApiQueryRecentChanges extends ApiQueryBase { $this->addWhereRange('rc_timestamp', $params['dir'], $params['start'], $params['end']); $this->addWhereFld('rc_namespace', $params['namespace']); $this->addWhereFld('rc_deleted', 0); - if($params['titles']) - { - $lb = new LinkBatch; - foreach($params['titles'] as $t) - { - $obj = Title::newFromText($t); - $lb->addObj($obj); - if($obj->getNamespace() < 0) - { - // LinkBatch refuses these, but we need them anyway - if(!array_key_exists($obj->getNamespace(), $lb->data)) - $lb->data[$obj->getNamespace()] = array(); - $lb->data[$obj->getNamespace()][$obj->getDBKey()] = 1; - } - } - $where = $lb->constructSet('rc', $this->getDB()); - if($where != '') - $this->addWhere($where); - } if(!is_null($params['type'])) $this->addWhereFld('rc_type', $this->parseRCType($params['type'])); @@ -389,9 +370,6 @@ class ApiQueryRecentChanges extends ApiQueryBase { ApiBase :: PARAM_ISMULTI => true, ApiBase :: PARAM_TYPE => 'namespace' ), - 'titles' => array( - ApiBase :: PARAM_ISMULTI => true - ), 'prop' => array ( ApiBase :: PARAM_ISMULTI => true, ApiBase :: PARAM_DFLT => 'title|timestamp|ids', @@ -451,7 +429,6 @@ class ApiQueryRecentChanges extends ApiQueryBase { 'end' => 'The timestamp to end enumerating.', 'dir' => 'In which direction to enumerate.', 'namespace' => 'Filter log entries to only this namespace(s)', - 'titles' => 'Filter log entries to only these page titles', 'prop' => 'Include additional pieces of information', 'token' => 'Which tokens to obtain for each change', 'show' => array (