From 58afa56f4a630a1ca9678f3dec967c3a48bf60cf Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Tue, 20 Jun 2006 09:09:20 +0000 Subject: [PATCH] Rights log changes: * Adding "(none)" notice also if the third parameter (new groups) is empty (when desysoping someone, for example). * Adding the "(none)" notice also in the recent changes. * Adding the "(none)" notice only if the action is "rights/rights", to prevent future potential incompatibility, if we add other log actions in "rights" log, or if an extension does so. * First checking if the parameter is null before checking if it's empty, to prevent an ugly notice appears when using Makesysop (apparently not in Wikimedia servers, I think notices are disabled there). --- includes/LogPage.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/LogPage.php b/includes/LogPage.php index 753c1dc47b..f588105f3d 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -154,8 +154,6 @@ class LogPage { } break; case 'rights': - if( trim( $params[0] ) == '' ) - $params[0] = wfMsg( 'rightsnone' ); $text = $wgContLang->ucfirst( $title->getText() ); $titleLink = $skin->makeLinkObj( Title::makeTitle( NS_USER, $text ) ); break; @@ -166,6 +164,17 @@ class LogPage { } else { $titleLink = $title->getPrefixedText(); } + if( $key == 'rights/rights' ) { + if ($skin) { + $rightsnone = wfMsg( 'rightsnone' ); + } else { + $rightsnone = wfMsgForContent( 'rightsnone' ); + } + if( !isset( $params[0] ) || trim( $params[0] ) == '' ) + $params[0] = $rightsnone; + if( !isset( $params[1] ) || trim( $params[1] ) == '' ) + $params[1] = $rightsnone; + } if( count( $params ) == 0 ) { if ( $skin ) { $rv = wfMsg( $wgLogActions[$key], $titleLink ); -- 2.20.1