Remove markread action from the read API

Don't merge till parent patch 84468 is merged and deployed

Change-Id: I863cf068754723701c26ba575c94a9852cac240e
This commit is contained in:
bsitu 2013-09-18 14:32:16 -07:00
parent 2b57fbd3c2
commit e19e8cd5b5

View file

@ -18,21 +18,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();
@ -181,15 +166,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',
@ -213,8 +189,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.',
@ -231,7 +205,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',
);
}