Add clearUserWatchedItems methods to WatchedItemStoreInterface
authoraddshore <addshorewiki@gmail.com>
Mon, 12 Feb 2018 12:22:03 +0000 (12:22 +0000)
committerKrinkle <krinklemail@gmail.com>
Tue, 13 Feb 2018 05:11:42 +0000 (05:11 +0000)
Follows up to 6cf900ffb0bec584e64202bc3.
The main implementation of these methods was merged, but the
method signatures were not added to the interface, nor to the
other implementations of that interface (NoWrite*).

I would have expected phan to spot this, if we were not
skipping so many of its checks.

Change-Id: I169d0312e9022d0d3b31d2424ec62dd9978f03bb

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 );
+
 }