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
Merge "resourceloader: Add $context to static functions in ResourceLoader"
[lhc/web/wiklou.git]
/
includes
/
watcheditem
/
WatchedItemStore.php
diff --git
a/includes/watcheditem/WatchedItemStore.php
b/includes/watcheditem/WatchedItemStore.php
index
d33b6ae
..
f0ded1f
100644
(file)
--- a/
includes/watcheditem/WatchedItemStore.php
+++ b/
includes/watcheditem/WatchedItemStore.php
@@
-236,7
+236,6
@@
class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
* @param int $dbIndex DB_MASTER or DB_REPLICA
*
* @return IDatabase
* @param int $dbIndex DB_MASTER or DB_REPLICA
*
* @return IDatabase
- * @throws MWException
*/
private function getConnectionRef( $dbIndex ) {
return $this->loadBalancer->getConnectionRef( $dbIndex, [ 'watchlist' ] );
*/
private function getConnectionRef( $dbIndex ) {
return $this->loadBalancer->getConnectionRef( $dbIndex, [ 'watchlist' ] );
@@
-383,9
+382,8
@@
class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
/**
* @param UserIdentity $user
/**
* @param UserIdentity $user
- * @param
TitleValue
[] $titles
+ * @param
LinkTarget
[] $titles
* @return bool
* @return bool
- * @throws MWException
*/
public function removeWatchBatchForUser( UserIdentity $user, array $titles ) {
if ( $this->readOnlyMode->isReadOnly() ) {
*/
public function removeWatchBatchForUser( UserIdentity $user, array $titles ) {
if ( $this->readOnlyMode->isReadOnly() ) {
@@
-718,7
+716,6
@@
class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
* @since 1.27
* @param UserIdentity $user
* @param LinkTarget $target
* @since 1.27
* @param UserIdentity $user
* @param LinkTarget $target
- * @throws MWException
*/
public function addWatch( UserIdentity $user, LinkTarget $target ) {
$this->addWatchBatchForUser( $user, [ $target ] );
*/
public function addWatch( UserIdentity $user, LinkTarget $target ) {
$this->addWatchBatchForUser( $user, [ $target ] );
@@
-729,7
+726,6
@@
class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
* @param UserIdentity $user
* @param LinkTarget[] $targets
* @return bool
* @param UserIdentity $user
* @param LinkTarget[] $targets
* @return bool
- * @throws MWException
*/
public function addWatchBatchForUser( UserIdentity $user, array $targets ) {
if ( $this->readOnlyMode->isReadOnly() ) {
*/
public function addWatchBatchForUser( UserIdentity $user, array $targets ) {
if ( $this->readOnlyMode->isReadOnly() ) {
@@
-790,7
+786,6
@@
class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
* @param UserIdentity $user
* @param LinkTarget $target
* @return bool
* @param UserIdentity $user
* @param LinkTarget $target
* @return bool
- * @throws MWException
*/
public function removeWatch( UserIdentity $user, LinkTarget $target ) {
return $this->removeWatchBatchForUser( $user, [ $target ] );
*/
public function removeWatch( UserIdentity $user, LinkTarget $target ) {
return $this->removeWatchBatchForUser( $user, [ $target ] );
@@
-1035,18
+1030,18
@@
class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
if ( $seenTime > $value->get( $subKey ) ) {
// Revision is newer than the last one seen
$value->set( $subKey, $seenTime );
if ( $seenTime > $value->get( $subKey ) ) {
// Revision is newer than the last one seen
$value->set( $subKey, $seenTime );
- $this->latestUpdateCache->set( $key, $value,
IExpiringStore
::TTL_PROC_LONG );
+ $this->latestUpdateCache->set( $key, $value,
BagOStuff
::TTL_PROC_LONG );
} elseif ( $seenTime === false ) {
// Revision does not exist
$value->set( $subKey, wfTimestamp( TS_MW ) );
} elseif ( $seenTime === false ) {
// Revision does not exist
$value->set( $subKey, wfTimestamp( TS_MW ) );
- $this->latestUpdateCache->set( $key, $value,
IExpiringStore
::TTL_PROC_LONG );
+ $this->latestUpdateCache->set( $key, $value,
BagOStuff
::TTL_PROC_LONG );
} else {
return false; // nothing to update
}
return $value;
},
} else {
return false; // nothing to update
}
return $value;
},
-
IExpiringStore
::TTL_HOUR
+
BagOStuff
::TTL_HOUR
);
// If the page is watched by the user (or may be watched), update the timestamp
);
// If the page is watched by the user (or may be watched), update the timestamp
@@
-1076,7
+1071,7
@@
class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
return $this->latestUpdateCache->getWithSetCallback(
$key,
return $this->latestUpdateCache->getWithSetCallback(
$key,
-
IExpiringStore
::TTL_PROC_LONG,
+
BagOStuff
::TTL_PROC_LONG,
function () use ( $key ) {
return $this->stash->get( $key ) ?: null;
}
function () use ( $key ) {
return $this->stash->get( $key ) ?: null;
}