From 02188097288c1b228359d8899fb2663f83ab25f0 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 25 Jan 2009 16:34:21 +0000 Subject: [PATCH] * fix usage of 'number_of_watching_users_RCview' message to correspond with the other one in the same file * use $this->message['hist'] rather than wfMsg( 'hist' ) * Whitespaces tweaks --- includes/ChangesList.php | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/includes/ChangesList.php b/includes/ChangesList.php index aebfed9627..538f188891 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -108,7 +108,7 @@ class ChangesList { public static function showCharacterDifference( $old, $new ) { global $wgRCChangedSizeThreshold, $wgLang; $szdiff = $new - $old; - $formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape'), $wgLang->formatNum($szdiff) ); + $formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape' ), $wgLang->formatNum( $szdiff ) ); if( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) { $tag = 'strong'; } else { @@ -223,9 +223,9 @@ class ChangesList { } /** Insert links to user page, user talk page and eventually a blocking link */ - public function insertUserRelatedLinks(&$s, &$rc) { - if( $this->isDeleted($rc,Revision::DELETED_USER) ) { - $s .= ' ' . wfMsgHtml('rev-deleted-user') . ''; + public function insertUserRelatedLinks( &$s, &$rc ) { + if( $this->isDeleted( $rc, Revision::DELETED_USER ) ) { + $s .= ' ' . wfMsgHtml( 'rev-deleted-user' ) . ''; } else { $s .= $this->skin->userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ); $s .= $this->skin->userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ); @@ -233,22 +233,22 @@ class ChangesList { } /** insert a formatted action */ - protected function insertAction(&$s, &$rc) { + protected function insertAction( &$s, &$rc ) { if( $rc->mAttribs['rc_type'] == RC_LOG ) { - if( $this->isDeleted($rc,LogPage::DELETED_ACTION) ) { - $s .= ' ' . wfMsgHtml('rev-deleted-event') . ''; + if( $this->isDeleted( $rc, LogPage::DELETED_ACTION ) ) { + $s .= ' ' . wfMsgHtml( 'rev-deleted-event' ) . ''; } else { $s .= ' '.LogPage::actionText( $rc->mAttribs['rc_log_type'], $rc->mAttribs['rc_log_action'], - $rc->getTitle(), $this->skin, LogPage::extractParams($rc->mAttribs['rc_params']), true, true ); + $rc->getTitle(), $this->skin, LogPage::extractParams( $rc->mAttribs['rc_params'] ), true, true ); } } } /** insert a formatted comment */ - protected function insertComment(&$s, &$rc) { + protected function insertComment( &$s, &$rc ) { if( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) { - if( $this->isDeleted($rc,Revision::DELETED_COMMENT) ) { - $s .= ' ' . wfMsgHtml('rev-deleted-comment') . ''; + if( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) { + $s .= ' ' . wfMsgHtml( 'rev-deleted-comment' ) . ''; } else { $s .= $this->skin->commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() ); } @@ -272,8 +272,8 @@ class ChangesList { static $cache = array(); if( $count > 0 ) { if( !isset( $cache[$count] ) ) { - $cache[$count] = wfMsgExt('number_of_watching_users_RCview', - array('parsemag', 'escape'), $wgLang->formatNum($count)); + $cache[$count] = wfMsgExt( 'number_of_watching_users_RCview', + array('parsemag', 'escape' ), $wgLang->formatNum( $count ) ); } return $cache[$count]; } else { @@ -288,7 +288,7 @@ class ChangesList { * @return bool */ public static function isDeleted( $rc, $field ) { - return ($rc->mAttribs['rc_deleted'] & $field) == $field; + return ( $rc->mAttribs['rc_deleted'] & $field ) == $field; } /** @@ -349,7 +349,7 @@ class OldChangesList extends ChangesList { * Format a line using the old system (aka without any javascript). */ public function recentChangesLine( &$rc, $watched = false ) { - global $wgContLang, $wgRCShowChangedSize, $wgUser; + global $wgContLang, $wgLang, $wgRCShowChangedSize, $wgUser; wfProfileIn( __METHOD__ ); # Should patrol-related stuff be shown? $unpatrolled = $wgUser->useRCPatrol() && !$rc->mAttribs['rc_patrolled']; @@ -402,8 +402,8 @@ class OldChangesList extends ChangesList { } # How many users watch this page if( $rc->numberofWatchingusers > 0 ) { - $s .= ' ' . wfMsg( 'number_of_watching_users_RCview', - $wgContLang->formatNum($rc->numberofWatchingusers) ); + $s .= ' ' . wfMsgExt( 'number_of_watching_users_RCview', + array( 'parsemag', 'escape' ), $wgLang->formatNum( $rc->numberofWatchingusers ) ); } wfRunHooks( 'OldChangesListRecentChangesLine', array(&$this, &$s, $rc) ); @@ -550,7 +550,7 @@ class EnhancedChangesList extends ChangesList { # Make user links if( $this->isDeleted($rc,Revision::DELETED_USER) ) { - $rc->userlink = ' ' . wfMsgHtml('rev-deleted-user') . ''; + $rc->userlink = ' ' . wfMsgHtml( 'rev-deleted-user' ) . ''; } else { $rc->userlink = $this->skin->userLink( $rc_user, $rc_user_text ); $rc->usertalklink = $this->skin->userToolLinks( $rc_user, $rc_user_text ); @@ -650,8 +650,8 @@ class EnhancedChangesList extends ChangesList { # onclick handler to toggle hidden/expanded $toggleLink = "onclick='toggleVisibility($jsid); return false'"; # Title for tags - $expandTitle = htmlspecialchars( wfMsg('rc-enhanced-expand') ); - $closeTitle = htmlspecialchars( wfMsg('rc-enhanced-hide') ); + $expandTitle = htmlspecialchars( wfMsg( 'rc-enhanced-expand' ) ); + $closeTitle = htmlspecialchars( wfMsg( 'rc-enhanced-hide' ) ); $tl = "" . $this->sideArrow() . ""; $tl .= ""; @@ -665,7 +665,7 @@ class EnhancedChangesList extends ChangesList { # Article link if( $namehidden ) { - $r .= ' ' . wfMsgHtml('rev-deleted-event') . ''; + $r .= ' ' . wfMsgHtml( 'rev-deleted-event' ) . ''; } else if( $allLogs ) { $r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched ); } else { @@ -685,7 +685,7 @@ class EnhancedChangesList extends ChangesList { $r .= ' '; if( !$allLogs ) { $r .= '('; - if( !ChangesList::userCan($rcObj,Revision::DELETED_TEXT) ) { + if( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT ) ) { $r .= $nchanges[$n]; } else if( $isnew ) { $r .= $nchanges[$n]; @@ -826,7 +826,7 @@ class EnhancedChangesList extends ChangesList { protected function sideArrow() { global $wgContLang; $dir = $wgContLang->isRTL() ? 'l' : 'r'; - return $this->arrow( $dir, '+', wfMsg('rc-enhanced-expand') ); + return $this->arrow( $dir, '+', wfMsg( 'rc-enhanced-expand' ) ); } /** @@ -835,7 +835,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML tag */ protected function downArrow() { - return $this->arrow( 'd', '-', wfMsg('rc-enhanced-hide') ); + return $this->arrow( 'd', '-', wfMsg( 'rc-enhanced-hide' ) ); } /** @@ -886,7 +886,7 @@ class EnhancedChangesList extends ChangesList { # Diff and hist links if ( $rc_type != RC_LOG ) { $r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator']; - $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), + $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), $this->message['hist'], $curIdEq.'&action=history' ) . ')'; } $r .= ' . . '; -- 2.20.1