Merge "Remove markread action from the read API"

This commit is contained in:
jenkins-bot 2013-12-10 02:00:37 +00:00 committed by Gerrit Code Review
commit f34f50da07

View file

@ -19,21 +19,6 @@ class ApiEchoNotifications extends ApiQueryBase {
$params = $this->extractRequestParams();
// @Todo - markread/markallread has been migrated to a separate new API module,
// any related code in this API should be removed in a follow-up patch so that
// anything integrated with markread will have time to switch to the new markread
// API, also to give client js code enough time to refresh
//
// There is no need to trigger markRead if all notifications are read
if ( $notifUser->getNotificationCount() > 0 ) {
if ( count( $params['markread'] ) ) {
// Make sure there is a limit to the update
$notifUser->markRead( array_slice( $params['markread'], 0, ApiBase::LIMIT_SML2 ) );
} elseif ( $params['markallread'] ) {
$notifUser->markAllRead();
}
}
$prop = $params['prop'];
$result = array();
@ -188,15 +173,6 @@ class ApiEchoNotifications extends ApiQueryBase {
),
ApiBase::PARAM_DFLT => 'list',
),
'markread' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_DEPRECATED => true,
),
'markallread' => array(
ApiBase::PARAM_REQUIRED => false,
ApiBase::PARAM_TYPE => 'boolean',
ApiBase::PARAM_DEPRECATED => true,
),
'format' => array(
ApiBase::PARAM_TYPE => array(
'text',
@ -220,8 +196,6 @@ class ApiEchoNotifications extends ApiQueryBase {
public function getParamDescription() {
return array(
'prop' => 'Details to request.',
'markread' => 'A list of notification IDs to mark as read',
'markallread' => "If set to true, marks all of a user's notifications as read",
'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.',
@ -238,7 +212,6 @@ class ApiEchoNotifications extends ApiQueryBase {
return array(
'api.php?action=query&meta=notifications',
'api.php?action=query&meta=notifications&notprop=count',
'api.php?action=query&meta=notifications&notmarkread=8',
);
}