X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWatchedItemQueryService.php;h=c80e4a53198ddcc8ba8df8aadd93561566ef75f6;hb=e7b57d881a;hp=0c3d52a39fefd78ad0ed1108a413407172f5f205;hpb=7874fc4bec845ad92960b07e969c65f3c3fe74f2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WatchedItemQueryService.php b/includes/WatchedItemQueryService.php index 0c3d52a39f..c80e4a5319 100644 --- a/includes/WatchedItemQueryService.php +++ b/includes/WatchedItemQueryService.php @@ -422,10 +422,7 @@ class WatchedItemQueryService { $ownersToken = $watchlistOwner->getOption( 'watchlisttoken' ); $token = $options['watchlistOwnerToken']; if ( $ownersToken == '' || !hash_equals( $ownersToken, $token ) ) { - throw new UsageException( - 'Incorrect watchlist token provided -- please set a correct token in Special:Preferences', - 'bad_wltoken' - ); + throw ApiUsageException::newWithMessage( null, 'apierror-bad-watchlist-token', 'bad_wltoken' ); } return $watchlistOwner->getId(); } @@ -474,7 +471,7 @@ class WatchedItemQueryService { } private function getStartEndConds( IDatabase $db, array $options ) { - if ( !isset( $options['start'] ) && ! isset( $options['end'] ) ) { + if ( !isset( $options['start'] ) && !isset( $options['end'] ) ) { return []; }