diff --git a/i18n/en.json b/i18n/en.json index 08f7943ed..37edce791 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -165,6 +165,11 @@ "apihelp-query+notifications-param-groupbysection": "Whether to group the result by section. Each section is fetched separately if set.", "apihelp-query+notifications-param-filter": "Filter notifications returned.", "apihelp-query+notifications-param-format": "If specified, notifications will be returned formatted this way.", + "apihelp-query+notifications-paramvalue-format-text": "Plaintext format", + "apihelp-query+notifications-paramvalue-format-model": "Raw notification data", + "apihelp-query+notifications-paramvalue-format-special": "Formatted for Special:Notifications page (and only that!) Do not rely on the HTML as it may change at any given time.", + "apihelp-query+notifications-paramvalue-format-flyout": "Deprecated. Use $1format=model for raw data", + "apihelp-query+notifications-paramvalue-format-html": "Deprecated. Use $1format=model for raw data", "apihelp-query+notifications-param-limit": "The maximum number of notifications to return.", "apihelp-query+notifications-param-index": "If specified, a list of notification IDs, in order, will be returned.", "apihelp-query+notifications-param-noforn": "True to opt out of data about notifications on foreign wikis.", diff --git a/i18n/qqq.json b/i18n/qqq.json index c23fef3a3..1829b63fe 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -186,6 +186,11 @@ "apihelp-query+notifications-param-groupbysection": "{{doc-apihelp-param|query+notifications|groupbysection}}", "apihelp-query+notifications-param-filter": "{{doc-apihelp-param|query+notifications|filter}}", "apihelp-query+notifications-param-format": "{{doc-apihelp-param|query+notifications|format}}", + "apihelp-query+notifications-paramvalue-format-text": "{{doc-apihelp-paramvalue|query+notifications|format|text}}", + "apihelp-query+notifications-paramvalue-format-model": "{{doc-apihelp-paramvalue|query+notifications|format|model}}", + "apihelp-query+notifications-paramvalue-format-special": "{{doc-apihelp-paramvalue|query+notifications|format|special}}", + "apihelp-query+notifications-paramvalue-format-flyout": "Deprecated", + "apihelp-query+notifications-paramvalue-format-html": "Deprecated", "apihelp-query+notifications-param-limit": "{{doc-apihelp-param|query+notifications|limit}}", "apihelp-query+notifications-param-index": "{{doc-apihelp-param|query+notifications|index}}", "apihelp-query+notifications-param-noforn": "{{doc-apihelp-param|query+notifications|noforn}}", diff --git a/includes/api/ApiEchoNotifications.php b/includes/api/ApiEchoNotifications.php index 40dcb27dc..435313438 100644 --- a/includes/api/ApiEchoNotifications.php +++ b/includes/api/ApiEchoNotifications.php @@ -18,6 +18,20 @@ class ApiEchoNotifications extends ApiQueryBase { $params = $this->extractRequestParams(); $prop = $params['prop']; + /* @deprecated */ + if ( $params['format'] === 'flyout' ) { + $this->setWarning( + "notformat=flyout has been deprecated and will be removed soon.\n". + "Use notformat=model to get the raw data or notformat=special\n". + "for pre-rendered HTML." + ); + } elseif ( $params['format'] === 'html' ) { + $this->setWarning( + "notformat=html has been deprecated and will be removed soon.\n". + "Use notformat=special instead." + ); + } + if ( $params['noforn'] ) { $foreignNotifications = null; } else { @@ -335,11 +349,12 @@ class ApiEchoNotifications extends ApiQueryBase { 'format' => array( ApiBase::PARAM_TYPE => array( 'text', - 'flyout', - 'html', 'model', 'special', + 'flyout', /* @deprecated */ + 'html', /* @deprecated */ ), + ApiBase::PARAM_HELP_MSG_PER_VALUE => array(), ), 'noforn' => false, 'limit' => array(