X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLogEvents.php;h=2c19c7d1aac560110aeee00e0cd6aecf73122642;hb=de64366f58f0af7a02a417833c8e0605e4140fab;hp=962d9561300c0ff60f8c62e08cc9263e1a02516b;hpb=1d1bb122942d2ca6e557dc13e2d198276ce65ba6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 962d956130..2c19c7d1aa 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -186,6 +186,7 @@ class ApiQueryLogEvents extends ApiQueryBase { // T71222: MariaDB's optimizer, at least 10.1.37 and .38, likes to choose a wildly bad plan for // some reason for this code path. Tell it not to use the wrong index it wants to pick. + // @phan-suppress-next-line PhanTypeMismatchArgument $this->addOption( 'IGNORE INDEX', [ 'logging' => [ 'times' ] ] ); } @@ -220,10 +221,12 @@ class ApiQueryLogEvents extends ApiQueryBase { // Paranoia: avoid brute force searches (T19342) if ( $params['namespace'] !== null || !is_null( $title ) || !is_null( $user ) ) { - if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) { + if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'deletedhistory' ) ) { $titleBits = LogPage::DELETED_ACTION; $userBits = LogPage::DELETED_USER; - } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$this->getPermissionManager() + ->userHasAnyRight( $this->getUser(), 'suppressrevision', 'viewsuppressed' ) + ) { $titleBits = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED; $userBits = LogPage::DELETED_USER | LogPage::DELETED_RESTRICTED; } else {