dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve documentation of constants throughout the codebase
[lhc/web/wiklou.git]
/
includes
/
watcheditem
/
NoWriteWatchedItemStore.php
diff --git
a/includes/watcheditem/NoWriteWatchedItemStore.php
b/includes/watcheditem/NoWriteWatchedItemStore.php
index
86e7be8
..
eabdb07
100644
(file)
--- a/
includes/watcheditem/NoWriteWatchedItemStore.php
+++ b/
includes/watcheditem/NoWriteWatchedItemStore.php
@@
-32,6
+32,8
@@
class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
*/
private $actualStore;
*/
private $actualStore;
+ const DB_READONLY_ERROR = 'The watchlist is currently readonly.';
+
/**
* Initialy set WatchedItemStore that will be used in cases where writing is not needed.
* @param WatchedItemStoreInterface $actualStore
/**
* Initialy set WatchedItemStore that will be used in cases where writing is not needed.
* @param WatchedItemStoreInterface $actualStore
@@
-91,23
+93,23
@@
class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
}
public function duplicateAllAssociatedEntries( LinkTarget $oldTarget, LinkTarget $newTarget ) {
}
public function duplicateAllAssociatedEntries( LinkTarget $oldTarget, LinkTarget $newTarget ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function duplicateEntry( LinkTarget $oldTarget, LinkTarget $newTarget ) {
}
public function duplicateEntry( LinkTarget $oldTarget, LinkTarget $newTarget ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function addWatch( User $user, LinkTarget $target ) {
}
public function addWatch( User $user, LinkTarget $target ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function addWatchBatchForUser( User $user, array $targets ) {
}
public function addWatchBatchForUser( User $user, array $targets ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function removeWatch( User $user, LinkTarget $target ) {
}
public function removeWatch( User $user, LinkTarget $target ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function setNotificationTimestampsForUser(
}
public function setNotificationTimestampsForUser(
@@
-115,15
+117,15
@@
class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
$timestamp,
array $targets = []
) {
$timestamp,
array $targets = []
) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function updateNotificationTimestamp( User $editor, LinkTarget $target, $timestamp ) {
}
public function updateNotificationTimestamp( User $editor, LinkTarget $target, $timestamp ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function resetAllNotificationTimestampsForUser( User $user ) {
}
public function resetAllNotificationTimestampsForUser( User $user ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function resetNotificationTimestamp(
}
public function resetNotificationTimestamp(
@@
-132,14
+134,19
@@
class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
$force = '',
$oldid = 0
) {
$force = '',
$oldid = 0
) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function clearUserWatchedItems( User $user ) {
}
public function clearUserWatchedItems( User $user ) {
- throw new DBReadOnlyError( null,
'The watchlist is currently readonly.'
);
+ throw new DBReadOnlyError( null,
self::DB_READONLY_ERROR
);
}
public function clearUserWatchedItemsUsingJobQueue( User $user ) {
}
public function clearUserWatchedItemsUsingJobQueue( User $user ) {
- throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
+ }
+
+ public function removeWatchBatchForUser( User $user, array $titles ) {
+ throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
}
}
+
}
}