From 81a6394395530336db7c5700d8bfe496eecebd50 Mon Sep 17 00:00:00 2001 From: aude Date: Mon, 2 Feb 2015 14:51:26 -0500 Subject: [PATCH] Add default type param for recentchanges and watchlist query api modules Set the type param for ApiQueryRecentChanges and ApiQueryWatchlist to 'edit|new|log', thus excluding 'external' type. In most cases, api users probably don't want external changes and they might be confusing, unless explicitly requested. Bug: T88254 Change-Id: I74bab5d4719f4e17118fa89a0ceb3e63c0246a1f --- RELEASE-NOTES-1.25 | 2 ++ includes/api/ApiQueryRecentChanges.php | 1 + includes/api/ApiQueryWatchlist.php | 1 + 3 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index d2edcb3602..65cbb50d46 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -238,6 +238,8 @@ production. * The following classes have been deprecated and may be removed in a future release: * ApiQueryDeletedrevs +* Default type param for ApiQueryWatchlist and ApiQueryRecentChanges has + been changed from all types (e.g. including 'external') to 'edit|new|log'. === Languages updated in 1.25 === diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index b6ef60460f..9ce6171f80 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -688,6 +688,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 ), 'type' => array( + ApiBase::PARAM_DFLT => 'edit|new|log', ApiBase::PARAM_ISMULTI => true, ApiBase::PARAM_TYPE => array( 'edit', diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 6e60fe465e..c801b78a04 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -499,6 +499,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { ) ), 'type' => array( + ApiBase::PARAM_DFLT => 'edit|new|log', ApiBase::PARAM_ISMULTI => true, ApiBase::PARAM_TYPE => array( 'edit', -- 2.20.1