X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialLog.php;h=7c858147e174dfbe0c7c51521bdc0f3d31d59f14;hb=25242105e8fd03c9900250bdf9ea91be9a286625;hp=c6927c1717a7e28e311d731e98fca2ddc33a32d4;hpb=4858f8afdabb2a1d7c60b7c14b6f4d398056c07e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index c6927c1717..7c858147e1 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -35,8 +35,6 @@ class SpecialLog extends SpecialPage { } public function execute( $par ) { - global $wgActorTableSchemaMigrationStage; - $this->setHeaders(); $this->outputHeader(); $out = $this->getOutput(); @@ -96,7 +94,9 @@ class SpecialLog extends SpecialPage { if ( !LogPage::isLogType( $type ) ) { $opts->setValue( 'type', '' ); } elseif ( isset( $logRestrictions[$type] ) - && !$this->getUser()->isAllowed( $logRestrictions[$type] ) + && !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $this->getUser(), $logRestrictions[$type] ) ) { throw new PermissionsError( $logRestrictions[$type] ); } @@ -107,13 +107,7 @@ class SpecialLog extends SpecialPage { $offenderName = $opts->getValue( 'offender' ); $offender = empty( $offenderName ) ? null : User::newFromName( $offenderName, false ); if ( $offender ) { - if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) { - $qc = [ 'ls_field' => 'target_author_actor', 'ls_value' => $offender->getActorId() ]; - } elseif ( $offender->getId() > 0 ) { - $qc = [ 'ls_field' => 'target_author_id', 'ls_value' => $offender->getId() ]; - } else { - $qc = [ 'ls_field' => 'target_author_ip', 'ls_value' => $offender->getName() ]; - } + $qc = [ 'ls_field' => 'target_author_actor', 'ls_value' => $offender->getActorId() ]; } } else { // Allow extensions to add relations to their search types