jenkins-bot has submitted this change and it was merged.

Change subject: Remove markread action from the read API
......................................................................


Remove markread action from the read API

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

Change-Id: I863cf068754723701c26ba575c94a9852cac240e
---
M api/ApiEchoNotifications.php
1 file changed, 0 insertions(+), 27 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php
index af827f1..740185a 100644
--- a/api/ApiEchoNotifications.php
+++ b/api/ApiEchoNotifications.php
@@ -18,21 +18,6 @@
 
                $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 @@
                                ),
                                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 @@
        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 @@
                return array(
                        'api.php?action=query&meta=notifications',
                        'api.php?action=query&meta=notifications&notprop=count',
-                       'api.php?action=query&meta=notifications&notmarkread=8',
                );
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84870
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I863cf068754723701c26ba575c94a9852cac240e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to