- if ( $mode === self::DEFERRED ) {
- $job = new ActivityUpdateJob(
- $title,
- array(
- 'type' => 'updateWatchlistNotification',
- 'userid' => $this->getUserId(),
- 'notifTime' => $notificationTimestamp,
- 'curTime' => time()
- )
- );
- // Try to run this post-send
- DeferredUpdates::addCallableUpdate( function() use ( $job ) {
- $job->run();
- } );
- } else {
- $dbw = wfGetDB( DB_MASTER );
- $dbw->update( 'watchlist',
- array( 'wl_notificationtimestamp' => $notificationTimestamp ),
- $this->dbCond(),
- __METHOD__
- );
- }
+ $job = new ActivityUpdateJob(
+ $title,
+ array(
+ 'type' => 'updateWatchlistNotification',
+ 'userid' => $this->getUserId(),
+ 'notifTime' => $notificationTimestamp,
+ 'curTime' => time()
+ )
+ );
+ // Try to run this post-send
+ DeferredUpdates::addCallableUpdate( function() use ( $job ) {
+ $job->run();
+ } );