Merge "Add clearUserWatchedItems methods to WatchedItemStoreInterface"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 13 Feb 2018 07:21:17 +0000 (07:21 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 13 Feb 2018 07:21:17 +0000 (07:21 +0000)
includes/watcheditem/NoWriteWatchedItemStore.php
includes/watcheditem/WatchedItemStoreInterface.php

index 1439421..1a0f504 100644 (file)
@@ -131,4 +131,11 @@ class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
                throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
        }
 
+       public function clearUserWatchedItems( User $user ) {
+               throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+       }
+
+       public function clearUserWatchedItemsUsingJobQueue( User $user ) {
+               throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+       }
 }
index d5a3d7c..133f480 100644 (file)
@@ -288,4 +288,22 @@ interface WatchedItemStoreInterface {
         */
        public function duplicateEntry( LinkTarget $oldTarget, LinkTarget $newTarget );
 
+       /**
+        * Queues a job that will clear the users watchlist using the Job Queue.
+        *
+        * @since 1.31
+        *
+        * @param User $user
+        */
+       public function clearUserWatchedItems( User $user );
+
+       /**
+        * Queues a job that will clear the users watchlist using the Job Queue.
+        *
+        * @since 1.31
+        *
+        * @param User $user
+        */
+       public function clearUserWatchedItemsUsingJobQueue( User $user );
+
 }