Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/251120
Change subject: Stop pretending to support MW 1.25 and older
......................................................................
Stop pretending to support MW 1.25 and older
We rely on features introduced later, such as the DateInputWidget.
Change-Id: If155c43bac2c22446ae660ad41d66f23420471f0
---
M includes/ApiFlickrBlacklist.php
M includes/ApiQueryAllCampaigns.php
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardUpload.js
4 files changed, 8 insertions(+), 76 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard
refs/changes/20/251120/1
diff --git a/includes/ApiFlickrBlacklist.php b/includes/ApiFlickrBlacklist.php
index 2e1280b..82f9fa2 100644
--- a/includes/ApiFlickrBlacklist.php
+++ b/includes/ApiFlickrBlacklist.php
@@ -48,37 +48,6 @@
}
/**
- * @deprecated since MediaWiki core 1.25
- */
- public function getParamDescription() {
- return array(
- 'url' => 'The flickr url to be tested',
- 'list' => 'When set, the complete blacklist is
returned. '
- . '(Cannot be used together with the url
parameter.)',
- );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getDescription() {
- return 'Validate a flickr URL by using its NSID for
blacklisting. When used '
- . 'with the list option, return all blacklisted NSIDs.';
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getExamples() {
- return array(
- // @codingStandardsIgnoreStart
-
'api.php?action=flickrblacklist&url=http%3A//farm1.staticflickr.com/44/147426941_98baf36fd1_o.jpg',
- 'api.php?action=flickrblacklist&list',
- // @codingStandardsIgnoreEnd
- );
- }
-
- /**
* @see ApiBase::getExamplesMessages()
*/
protected function getExamplesMessages() {
diff --git a/includes/ApiQueryAllCampaigns.php
b/includes/ApiQueryAllCampaigns.php
index 63eb0f7..ee3117c 100644
--- a/includes/ApiQueryAllCampaigns.php
+++ b/includes/ApiQueryAllCampaigns.php
@@ -122,38 +122,8 @@
ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
),
'continue' => array(
- /** @todo Once support for MediaWiki < 1.25 is
dropped,
- just use ApiBase::PARAM_HELP_MSG directly */
- constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' =>
'api-help-param-continue',
+ ApiBase::PARAM_HELP_MSG =>
'api-help-param-continue',
),
- );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getParamDescription() {
- return array(
- 'enabledonly' => 'Only list campaigns that are enabled',
- 'limit' => 'Number of campaigns to return',
- 'continue' => 'When more results are available, use
this paramter to continue'
- );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getDescription() {
- return 'Enumerate all Campaigns';
- }
-
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getExamples() {
- return array(
-
'api.php?action=query&list=allcampaigns&uwcenabledonly=' => 'Enumerate enabled
campaigns'
);
}
@@ -171,4 +141,3 @@
return
'https://www.mediawiki.org/wiki/Extension:UploadWizard/API';
}
}
-
diff --git a/resources/mw.UploadWizardDetails.js
b/resources/mw.UploadWizardDetails.js
index a43d4e7..9ef3108 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -1795,11 +1795,8 @@
};
if ( code === 'badtoken' ) {
- // mw.Api#badToken is new in MW 1.26, stay
compatible with older versions
- if ( this.api.badToken ) {
- this.api.badToken( 'edit' );
- // TODO Automatically try again instead
of requiring the user to bonk the button
- }
+ this.api.badToken( 'edit' );
+ // TODO Automatically try again instead of
requiring the user to bonk the button
}
if ( result && result.error && result.error.code ) {
diff --git a/resources/mw.UploadWizardUpload.js
b/resources/mw.UploadWizardUpload.js
index 4c7acc6..da20c4d 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -192,14 +192,11 @@
code = result.error.code;
}
if ( code === 'badtoken' ) {
- // mw.Api#badToken is new in MW 1.26, stay
compatible with older versions
- if ( this.api.badToken ) {
- this.api.badToken( 'edit' );
- // Try again once
- if ( !this.ignoreWarning[ code ] ) {
- this.removeErrors( code );
- return;
- }
+ this.api.badToken( 'edit' );
+ // Try again once
+ if ( !this.ignoreWarning[ code ] ) {
+ this.removeErrors( code );
+ return;
}
}
if ( code === 'filetype-banned' &&
result.error.blacklisted ) {
--
To view, visit https://gerrit.wikimedia.org/r/251120
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If155c43bac2c22446ae660ad41d66f23420471f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits