X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLogEvents.php;h=2c19c7d1aac560110aeee00e0cd6aecf73122642;hp=c995ec5e8f8d69672e01308419a6ae494779c234;hb=fa0f6f34972c0e0f4aac24a03b3efdfc45f256f6;hpb=1d286560d2cd4f2adf6138f62a8dfcfad5991c14 diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index c995ec5e8f..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' ] ] ); } @@ -223,7 +224,9 @@ class ApiQueryLogEvents extends ApiQueryBase { 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 {