Commit graph

8 commits

Author SHA1 Message Date
addshore
165a30184e Remove unused deprecated WatchedItem methods
Not used in core or in any extensions on Gerrit

Change-Id: I10f0e98f52189f60480f5adb824a5cca9820d5f5
2016-07-26 10:52:31 +00:00
addshore
8a71ee8ec3 Make WatchedItemStore use MediaWikiServices
(This is a re-submi8t of I5c8c1a65 after it got reverted by Iae7f7b7)

Change-Id: I193de7ef1566336040463b71735b09db941d8ce1
2016-05-06 08:47:29 +00:00
Kunal Mehta
c9d885f3b4 Namespace LinkTarget under MediaWiki\Linker
And add a GPL file header while we're at it.

Change-Id: I15a6f240124c879b21fb655ade1baaebf4f34ffd
2016-04-21 17:19:10 -07:00
Catrope
deb22bced7 Revert "Make WatchedItemStore use MediaWikiServices"
In order to cleanly revert "Allow reset of global services"
which breaks login.

This reverts commit 99e8d45b50.

Change-Id: Iae7f7b7b7083345dd50c313ee68e2e814f130f1a
2016-04-11 20:25:47 +00:00
addshore
99e8d45b50 Make WatchedItemStore use MediaWikiServices
Change-Id: I5c8c1a652a35e055d8d65753a60c0d1684e1c37d
2016-04-11 15:50:15 +01:00
addshore
12e2e9edbc Switch Signature of WatchedItemStore::addWatchBatch
Adding batches of watched items per users
makes much more sense.
Only the deprecated static WatchedItem method
needed the old silly way of passing in objects.

Change-Id: I90f9583b66bd3b5afcf07faefedb38a8a0149f6e
2016-03-24 18:28:08 +00:00
addshore
3ab9a9656c Reset WatchedItemStore default instance after tests
Prior to this change in tests the overridden store
would remain in the instance static and thus could
be used in other places.

This patch introduces the used of ScopedCallbacks
in the override methods in WatchedItemStore.
This means that any instance of WatchedItemStore
should return to a regular state after each test.

This is better than requiring the tests to reset
the value back to the origional as this would likely
be forgotten and result in long hunts for failing
tests.

This was found while writing more tests...

Change-Id: I9aa71425642174ae9ea2c6d4f85dcd07d724af11
2016-03-15 15:36:38 +00:00
addshore
fee0afdc8a Move WatchedItem logic to WatchedItemStore
This also removes assumptions that when a page
in one Namespace should be watched / removed
that the page in the talk / subject ns for the
page should have the same action applied

This should maintain all backward compatability
for the WatchedItem class

This also includes tests written by:
 - WMDE-leszek
 - Addshore

Bug: T127956
Change-Id: Iad9abafe4417bb479151a3bfbee6e1c78a3afe3c
2016-03-08 15:41:22 +00:00