X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fjobqueue%2Fjobs%2FActivityUpdateJob.php;h=da4ec2336da959fc78b65ce8738f5c1caa904d16;hb=82e2c924e473fa3b99bb8e0da71d99b70ec5ca07;hp=f146e6e8bc7bf4a088f327bebdcb08d62e498592;hpb=9127d9ea9d2183a68699d46ffa088fd2c52c6431;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/jobs/ActivityUpdateJob.php b/includes/jobqueue/jobs/ActivityUpdateJob.php index f146e6e8bc..da4ec2336d 100644 --- a/includes/jobqueue/jobs/ActivityUpdateJob.php +++ b/includes/jobqueue/jobs/ActivityUpdateJob.php @@ -16,7 +16,6 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @author Aaron Schulz * @ingroup JobQueue */ @@ -41,7 +40,8 @@ class ActivityUpdateJob extends Job { if ( $this->params['type'] === 'updateWatchlistNotification' ) { $this->updateWatchlistNotification(); } else { - throw new Exception( "Invalid 'type' parameter '{$this->params['type']}'." ); + throw new InvalidArgumentException( + "Invalid 'type' parameter '{$this->params['type']}'." ); } return true; @@ -54,10 +54,10 @@ class ActivityUpdateJob extends Job { $dbw = wfGetDB( DB_MASTER ); $dbw->update( 'watchlist', - array( + [ 'wl_notificationtimestamp' => $dbw->timestampOrNull( $this->params['notifTime'] ) - ), - array( + ], + [ 'wl_user' => $this->params['userid'], 'wl_namespace' => $this->title->getNamespace(), 'wl_title' => $this->title->getDBkey(), @@ -68,7 +68,7 @@ class ActivityUpdateJob extends Job { // is non-NULL, make sure not to set it back in time or set it to // NULL when newer revisions were in fact added to the page. 'wl_notificationtimestamp < ' . $dbw->addQuotes( $dbw->timestamp( $casTimestamp ) ) - ), + ], __METHOD__ ); }