mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Deprecate ApiEchoNotifications.php format params flyout & html
Change-Id: Ib1db9dbec7a0980b10ba4dc1b3f62ea468437390
This commit is contained in:
parent
cb86b3cd43
commit
c94c8abb53
|
@ -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": "<span class=\"apihelp-deprecated\">Deprecated</span>. Use <kbd>$1format=model</kbd> for raw data",
|
||||
"apihelp-query+notifications-paramvalue-format-html": "<span class=\"apihelp-deprecated\">Deprecated</span>. Use <kbd>$1format=model</kbd> 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.",
|
||||
|
|
|
@ -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": "<span class=\"apihelp-deprecated\">Deprecated</span>",
|
||||
"apihelp-query+notifications-paramvalue-format-html": "<span class=\"apihelp-deprecated\">Deprecated</span>",
|
||||
"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}}",
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue