From fdd56cc6ec703ca81939e676e8e84572143650e5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 10 Sep 2008 22:06:41 +0000 Subject: [PATCH] Show protection details in RC too --- includes/LogEventsList.php | 13 +------------ includes/LogPage.php | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 075860aa58..b189667773 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -239,18 +239,7 @@ class LogEventsList { 'action=unblock&ip=' . urlencode( $row->log_title ) ) . ')'; // Show change protection link } else if( self::typeAction($row,'protect',array('modify','protect','unprotect')) ) { - if( $row->log_type == 'protect' && count($paramArray) == 3 ) { - $revert .= " [{$paramArray[0]}]"; // the restrictions - if( $paramArray[1] != 'infinity' ) { - $revert .= ' (' . wfMsgForContent( 'protect-expiring', - $wgContLang->timeanddate( $paramArray[1], false, false ) ).')'; - } - if( $paramArray[2] ) { - $revert .= ' ['.wfMsg('protect-summary-cascade').']'; - } - } - $revert = $revert ? "$revert " : ""; - $revert .= '(' . $this->skin->makeKnownLinkObj( $title, $this->message['hist'], + $revert .= ' (' . $this->skin->makeKnownLinkObj( $title, $this->message['hist'], 'action=history&offset=' . urlencode($row->log_timestamp) ) . ')'; if( $wgUser->isAllowed('protect') && $row->log_action != 'unprotect' ) { $revert .= ' (' . $this->skin->makeKnownLinkObj( $title, $this->message['protect_change'], diff --git a/includes/LogPage.php b/includes/LogPage.php index 983b952e9b..e039e3393d 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -242,18 +242,28 @@ class LogPage { $rv = wfMsgForContent( $wgLogActions[$key], $titleLink ); } } else { + $details = ''; array_unshift( $params, $titleLink ); if ( $key == 'block/block' || $key == 'suppress/block' ) { if ( $skin ) { - $params[1] = '' . $wgLang->translateBlockExpiry( $params[1] ) . ''; + $params[1] = '' . + $wgLang->translateBlockExpiry( $params[1] ) . ''; } else { $params[1] = $wgContLang->translateBlockExpiry( $params[1] ); } - $params[2] = isset( $params[2] ) - ? self::formatBlockFlags( $params[2], is_null( $skin ) ) - : ''; + $params[2] = isset( $params[2] ) ? + self::formatBlockFlags( $params[2], is_null( $skin ) ) : ''; + } else if ( $type == 'protect' && count($params) == 4 ) { + $details .= " [{$params[1]}]"; // the restrictions + if( $params[2] != 'infinity' ) { + $details .= ' (' . wfMsgForContent( 'protect-expiring', + $wgContLang->timeanddate( $params[2], false, false ) ).')'; + } + if( $params[3] ) { + $details .= ' ['.wfMsg('protect-summary-cascade').']'; + } } - $rv = wfMsgReal( $wgLogActions[$key], $params, true, !$skin ); + $rv = wfMsgReal( $wgLogActions[$key], $params, true, !$skin ) . $details; } } } else { -- 2.20.1