X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiSetNotificationTimestamp.php;h=ba4c6e832170ff94cb260d0e70ea3b154ea92784;hb=e2e5e5d76cf993b59d0d79d00556f97d8de02fdf;hp=b81c5bf6e0691b222cee8a5a06e677a87f48f4b0;hpb=0ad38c3a440b6a2113346bed625bec791e38c13d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiSetNotificationTimestamp.php b/includes/api/ApiSetNotificationTimestamp.php index b81c5bf6e0..ba4c6e8321 100644 --- a/includes/api/ApiSetNotificationTimestamp.php +++ b/includes/api/ApiSetNotificationTimestamp.php @@ -108,10 +108,7 @@ class ApiSetNotificationTimestamp extends ApiBase { $result = []; if ( $params['entirewatchlist'] ) { // Entire watchlist mode: Just update the thing and return a success indicator - $watchedItemStore->setNotificationTimestampsForUser( - $user, - $timestamp - ); + $watchedItemStore->resetAllNotificationTimestampsForUser( $user, $timestamp ); $result['notificationtimestamp'] = is_null( $timestamp ) ? '' @@ -157,7 +154,7 @@ class ApiSetNotificationTimestamp extends ApiBase { $ns = $title->getNamespace(); $dbkey = $title->getDBkey(); $r = [ - 'ns' => intval( $ns ), + 'ns' => (int)$ns, 'title' => $title->getPrefixedText(), ]; if ( !$title->exists() ) {