From 66774b8d7a66981638f3ac595889068b159f6c15 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Tue, 21 Aug 2018 19:19:10 +0200 Subject: [PATCH] Show an extract of suppression log for Special:AbuseLog Like we do in core for similar special pages. This is really helpful when (un)hiding an entry. Bug: T200645 Change-Id: I16450a2573e8987e31a83ec34f3dbb16fac94f81 --- includes/special/SpecialAbuseLog.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/special/SpecialAbuseLog.php b/includes/special/SpecialAbuseLog.php index a1a19c514..8d764bcc0 100644 --- a/includes/special/SpecialAbuseLog.php +++ b/includes/special/SpecialAbuseLog.php @@ -242,8 +242,9 @@ class SpecialAbuseLog extends SpecialPage { * @param string $id */ public function showHideForm( $id ) { + $output = $this->getOutput(); if ( !$this->getUser()->isAllowed( 'abusefilter-hide-log' ) ) { - $this->getOutput()->addWikiMsg( 'abusefilter-log-hide-forbidden' ); + $output->addWikiMsg( 'abusefilter-log-hide-forbidden' ); return; } @@ -295,6 +296,11 @@ class SpecialAbuseLog extends SpecialPage { ->addHiddenField( 'hide', $id ) ->setSubmitCallback( [ $this, 'saveHideForm' ] ) ->show(); + + // Show suppress log for this entry + $suppressLogPage = new LogPage( 'suppress' ); + $output->addHTML( "

" . $suppressLogPage->getName()->escaped() . "

\n" ); + LogEventsList::showLogExtract( $output, 'suppress', $this->getPageTitle( $id ) ); } /**