aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/api/ApiDelete.php2
-rw-r--r--includes/api/ApiEditPage.php2
-rw-r--r--includes/api/ApiExpandTemplates.php5
-rw-r--r--includes/api/ApiHelp.php1
-rw-r--r--includes/api/ApiMove.php2
-rw-r--r--includes/api/ApiProtect.php3
-rw-r--r--includes/api/ApiQueryLangLinks.php1
-rw-r--r--includes/api/ApiQueryStashImageInfo.php1
-rw-r--r--includes/api/ApiQueryUserContributions.php1
-rw-r--r--includes/api/ApiUpload.php2
-rw-r--r--includes/api/ApiWatch.php1
11 files changed, 21 insertions, 0 deletions
diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php
index f26d58bd4aac..aab030327525 100644
--- a/includes/api/ApiDelete.php
+++ b/includes/api/ApiDelete.php
@@ -72,8 +72,10 @@ class ApiDelete extends ApiBase {
// Deprecated parameters
if ( $params['watch'] ) {
+ $this->logFeatureUsage( 'action=delete&watch' );
$watch = 'watch';
} elseif ( $params['unwatch'] ) {
+ $this->logFeatureUsage( 'action=delete&unwatch' );
$watch = 'unwatch';
} else {
$watch = $params['watchlist'];
diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index fff061f9289d..9126ad3c6b4e 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -309,8 +309,10 @@ class ApiEditPage extends ApiBase {
// Deprecated parameters
if ( $params['watch'] ) {
+ $this->logFeatureUsage( 'action=edit&watch' );
$watch = true;
} elseif ( $params['unwatch'] ) {
+ $this->logFeatureUsage( 'action=edit&unwatch' );
$watch = false;
}
diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php
index c2cec6d8f710..8a3b534d4b41 100644
--- a/includes/api/ApiExpandTemplates.php
+++ b/includes/api/ApiExpandTemplates.php
@@ -42,6 +42,7 @@ class ApiExpandTemplates extends ApiBase {
$this->requireMaxOneParameter( $params, 'prop', 'generatexml' );
if ( $params['prop'] === null ) {
+ $this->logFeatureUsage( 'action=expandtemplates&!prop' );
$this->setWarning( 'Because no values have been specified for the prop parameter, a ' .
'legacy format has been used for the output. This format is deprecated, and in ' .
'the future, a default value will be set for the prop parameter, causing the new' .
@@ -70,6 +71,10 @@ class ApiExpandTemplates extends ApiBase {
$retval = array();
if ( isset( $prop['parsetree'] ) || $params['generatexml'] ) {
+ if ( !isset( $prop['parsetree'] ) ) {
+ $this->logFeatureUsage( 'action=expandtemplates&generatexml' );
+ }
+
$wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS );
$dom = $wgParser->preprocessToDom( $params['text'] );
if ( is_callable( array( $dom, 'saveXML' ) ) ) {
diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php
index b0b832862a8d..bcd6c12e7c2b 100644
--- a/includes/api/ApiHelp.php
+++ b/includes/api/ApiHelp.php
@@ -51,6 +51,7 @@ class ApiHelp extends ApiBase {
}
if ( is_array( $params['querymodules'] ) ) {
+ $this->logFeatureUsage( 'action=help&querymodules' );
$queryModules = $params['querymodules'];
foreach ( $queryModules as $m ) {
$modules[] = 'query+' . $m;
diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php
index cc585732b78f..602a90531100 100644
--- a/includes/api/ApiMove.php
+++ b/includes/api/ApiMove.php
@@ -134,8 +134,10 @@ class ApiMove extends ApiBase {
$watch = $params['watchlist'];
} elseif ( $params['watch'] ) {
$watch = 'watch';
+ $this->logFeatureUsage( 'action=move&watch' );
} elseif ( $params['unwatch'] ) {
$watch = 'unwatch';
+ $this->logFeatureUsage( 'action=move&unwatch' );
}
// Watch pages
diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php
index 828fc22ab2c6..844d1ccee730 100644
--- a/includes/api/ApiProtect.php
+++ b/includes/api/ApiProtect.php
@@ -102,6 +102,9 @@ class ApiProtect extends ApiBase {
$cascade = $params['cascade'];
+ if ( $params['watch'] ) {
+ $this->logFeatureUsage( 'action=protect&watch' );
+ }
$watch = $params['watch'] ? 'watch' : $params['watchlist'];
$this->setWatch( $watch, $titleObj, 'watchdefault' );
diff --git a/includes/api/ApiQueryLangLinks.php b/includes/api/ApiQueryLangLinks.php
index d04e5b4f64d5..da05f2732b79 100644
--- a/includes/api/ApiQueryLangLinks.php
+++ b/includes/api/ApiQueryLangLinks.php
@@ -50,6 +50,7 @@ class ApiQueryLangLinks extends ApiQueryBase {
// Handle deprecated param
$this->requireMaxOneParameter( $params, 'url', 'prop' );
if ( $params['url'] ) {
+ $this->logFeatureUsage( 'prop=langlinks&llurl' );
$prop = array( 'url' => 1 );
}
diff --git a/includes/api/ApiQueryStashImageInfo.php b/includes/api/ApiQueryStashImageInfo.php
index d7904d4ad98b..db9285602aa3 100644
--- a/includes/api/ApiQueryStashImageInfo.php
+++ b/includes/api/ApiQueryStashImageInfo.php
@@ -47,6 +47,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo {
// Alias sessionkey to filekey, but give an existing filekey precedence.
if ( !$params['filekey'] && $params['sessionkey'] ) {
+ $this->logFeatureUsage( 'prop=stashimageinfo&siisessionkey' );
$params['filekey'] = $params['sessionkey'];
}
diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php
index b8b4e3156eba..4b167b8b7a58 100644
--- a/includes/api/ApiQueryUserContributions.php
+++ b/includes/api/ApiQueryUserContributions.php
@@ -224,6 +224,7 @@ class ApiQueryContributions extends ApiQueryBase {
$show = $this->params['show'];
if ( $this->params['toponly'] ) { // deprecated/old param
+ $this->logFeatureUsage( 'list=usercontribs&uctoponly' );
$show[] = 'top';
}
if ( !is_null( $show ) ) {
diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index 31816d6f5957..368e7ce6a4cd 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -52,6 +52,7 @@ class ApiUpload extends ApiBase {
// Copy the session key to the file key, for backward compatibility.
if ( !$this->mParams['filekey'] && $this->mParams['sessionkey'] ) {
+ $this->logFeatureUsage( 'action=upload&sessionkey' );
$this->mParams['filekey'] = $this->mParams['sessionkey'];
}
@@ -604,6 +605,7 @@ class ApiUpload extends ApiBase {
// Deprecated parameters
if ( $this->mParams['watch'] ) {
+ $this->logFeatureUsage( 'action=upload&watch' );
$watch = true;
}
diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php
index 43ff4eccf6c3..80602606c8d2 100644
--- a/includes/api/ApiWatch.php
+++ b/includes/api/ApiWatch.php
@@ -84,6 +84,7 @@ class ApiWatch extends ApiBase {
);
}
+ $this->logFeatureUsage( 'action=watch&title' );
$title = Title::newFromText( $params['title'] );
if ( !$title || !$title->isWatchable() ) {
$this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );