$titles = $pageSet->getGoodTitles();
$title = reset( $titles );
if ( $title ) {
+ // XXX $title isn't actually used, can we just get rid of the previous six lines?
$timestamp = MediaWikiServices::getInstance()->getRevisionStore()
- ->getTimestampFromId( $title, $params['torevid'], IDBAccessObject::READ_LATEST );
+ ->getTimestampFromId( $params['torevid'], IDBAccessObject::READ_LATEST );
if ( $timestamp ) {
$timestamp = $dbw->timestamp( $timestamp );
} else {
$result = [];
if ( $params['entirewatchlist'] ) {
// Entire watchlist mode: Just update the thing and return a success indicator
- if ( is_null( $timestamp ) ) {
- $watchedItemStore->resetAllNotificationTimestampsForUser( $user );
- } else {
- $watchedItemStore->setNotificationTimestampsForUser(
- $user,
- $timestamp
- );
- }
+ $watchedItemStore->resetAllNotificationTimestampsForUser( $user, $timestamp );
$result['notificationtimestamp'] = is_null( $timestamp )
? ''