mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-30 18:45:07 +00:00
API: Remove pre-1.25 compat code
We already require at least 1.26. Change-Id: I09ca09fd06fdbf0b367f8a454898c6b7992be42d
This commit is contained in:
parent
c8329a728e
commit
1a72434c62
|
@ -66,18 +66,6 @@ class ApiEchoMarkRead extends ApiBase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getParamDescription() {
|
|
||||||
return array(
|
|
||||||
'list' => 'A list of notification IDs to mark as read',
|
|
||||||
'all' => "If set to true, marks all of a user's notifications as read",
|
|
||||||
'sections' => 'A list of sections to mark as read',
|
|
||||||
'token' => 'edit token',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function needsToken() {
|
public function needsToken() {
|
||||||
return 'csrf';
|
return 'csrf';
|
||||||
}
|
}
|
||||||
|
@ -94,23 +82,6 @@ class ApiEchoMarkRead extends ApiBase {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getDescription() {
|
|
||||||
return 'Mark notifications as read for the current user';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getExamples() {
|
|
||||||
return array(
|
|
||||||
'api.php?action=echomarkread&list=8',
|
|
||||||
'api.php?action=echomarkread&all=true'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ApiBase::getExamplesMessages()
|
* @see ApiBase::getExamplesMessages()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,15 +34,6 @@ class ApiEchoMarkSeen extends ApiBase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getParamDescription() {
|
|
||||||
return array(
|
|
||||||
'token' => 'edit token',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function needsToken() {
|
public function needsToken() {
|
||||||
return 'csrf';
|
return 'csrf';
|
||||||
}
|
}
|
||||||
|
@ -59,22 +50,6 @@ class ApiEchoMarkSeen extends ApiBase {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getDescription() {
|
|
||||||
return 'Mark notifications as seen for the current user';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getExamples() {
|
|
||||||
return array(
|
|
||||||
'api.php?action=echomarkseen',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ApiBase::getExamplesMessages()
|
* @see ApiBase::getExamplesMessages()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -242,8 +242,7 @@ class ApiEchoNotifications extends ApiQueryBase {
|
||||||
),
|
),
|
||||||
'index' => false,
|
'index' => false,
|
||||||
'continue' => array(
|
'continue' => array(
|
||||||
/** @todo Once support for MediaWiki < 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly */
|
ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
|
||||||
constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' => 'api-help-param-continue',
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
foreach ( $sections as $section ) {
|
foreach ( $sections as $section ) {
|
||||||
|
@ -257,42 +256,6 @@ class ApiEchoNotifications extends ApiQueryBase {
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getParamDescription() {
|
|
||||||
return array(
|
|
||||||
'prop' => 'Details to request.',
|
|
||||||
'sections' => 'The notification sections to query (i.e. some combination of \'alert\' and \'message\').',
|
|
||||||
'groupbysection' => 'Whether to group the result by section, each section is fetched separately if set',
|
|
||||||
'format' => 'If specified, notifications will be returned formatted this way.',
|
|
||||||
'index' => 'If specified, a list of notification IDs, in order, will be returned.',
|
|
||||||
'limit' => 'The maximum number of notifications to return.',
|
|
||||||
'continue' => 'When more results are available, use this to continue, this is used only when groupbysection is not set.',
|
|
||||||
'alertcontinue' => 'When more alert results are available, use this to continue.',
|
|
||||||
'messagecontinue' => 'When more message results are available, use this to continue.',
|
|
||||||
'alertunreadfirst' => 'Whether to show unread message notifications first',
|
|
||||||
'messageunreadfirst' => 'Whether to show unread alert notifications first'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getDescription() {
|
|
||||||
return 'Get notifications waiting for the current user';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since MediaWiki core 1.25
|
|
||||||
*/
|
|
||||||
public function getExamples() {
|
|
||||||
return array(
|
|
||||||
'api.php?action=query&meta=notifications',
|
|
||||||
'api.php?action=query&meta=notifications¬prop=count¬sections=alert|message¬groupbysection=1',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ApiBase::getExamplesMessages()
|
* @see ApiBase::getExamplesMessages()
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue