From a6a1841d48d593508375866a73cff7a6ac4a11dc Mon Sep 17 00:00:00 2001 From: Fomafix Date: Tue, 16 Jul 2019 17:36:30 +0200 Subject: [PATCH] Remove deprecated mw.Api.errors and mw.Api.warnings This static properties are deprecated since 1.29. Change-Id: Iaf3de57105d04497026305c27cd1d745820657a4 --- RELEASE-NOTES-1.34 | 2 + resources/src/mediawiki.api/index.js | 76 ---------------------------- 2 files changed, 2 insertions(+), 76 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 1bd4980b76..7f3564612c 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -291,6 +291,8 @@ because of Phabricator reports. * The parameter $lang of the functions generateTOC and tocList in Linker and DummyLinker must be in type Language when present. Other types are deprecated since 1.33. +* The static properties mw.Api.errors and mw.Api.warnings, deprecated in 1.29, + have been removed. * … === Deprecations in 1.34 === diff --git a/resources/src/mediawiki.api/index.js b/resources/src/mediawiki.api/index.js index 06130232e2..1772152375 100644 --- a/resources/src/mediawiki.api/index.js +++ b/resources/src/mediawiki.api/index.js @@ -430,80 +430,4 @@ } }; - /** - * @static - * @property {Array} - * Very incomplete and outdated list of errors we might receive from the API. Do not use. - * @deprecated since 1.29 - */ - mw.Api.errors = [ - // occurs when POST aborted - // jQuery 1.4 can't distinguish abort or lost connection from 200 OK + empty result - 'ok-but-empty', - - // timeout - 'timeout', - - // really a warning, but we treat it like an error - 'duplicate', - 'duplicate-archive', - - // upload succeeded, but no image info. - // this is probably impossible, but might as well check for it - 'noimageinfo', - // remote errors, defined in API - 'uploaddisabled', - 'nomodule', - 'mustbeposted', - 'badaccess-groups', - 'missingresult', - 'missingparam', - 'invalid-file-key', - 'copyuploaddisabled', - 'mustbeloggedin', - 'empty-file', - 'file-too-large', - 'filetype-missing', - 'filetype-banned', - 'filetype-banned-type', - 'filename-tooshort', - 'illegal-filename', - 'verification-error', - 'hookaborted', - 'unknown-error', - 'internal-error', - 'overwrite', - 'badtoken', - 'fetchfileerror', - 'fileexists-shared-forbidden', - 'invalidtitle', - 'notloggedin', - 'autoblocked', - 'blocked', - - // Stash-specific errors - expanded - 'stashfailed', - 'stasherror', - 'stashedfilenotfound', - 'stashpathinvalid', - 'stashfilestorage', - 'stashzerolength', - 'stashnotloggedin', - 'stashwrongowner', - 'stashnosuchfilekey' - ]; - mw.log.deprecate( mw.Api, 'errors', mw.Api.errors, null, 'mw.Api.errors' ); - - /** - * @static - * @property {Array} - * Very incomplete and outdated list of warnings we might receive from the API. Do not use. - * @deprecated since 1.29 - */ - mw.Api.warnings = [ - 'duplicate', - 'exists' - ]; - mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, null, 'mw.Api.warnings' ); - }() ); -- 2.20.1