r51004 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51003‎ | r51004 | r51005 >
Date:09:23, 26 May 2009
Author:aaron
Status:ok
Tags:
Comment:
Simplified reviewLogLine()
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1243,31 +1243,26 @@
12441244 * @param string $type
12451245 * @param string $action
12461246 * @param object $title
1247 - * @param array $paramArray
1248 - * @param string $c
1249 - * @param string $r user tool links
1250 - * @param string $t timestamp of the log entry
 1247+ * @param array $params
12511248 * @return bool true
12521249 */
1253 - public static function reviewLogLine( $type='', $action='', $title=null,
1254 - $paramArray=array(), &$c, &$r )
1255 - {
 1250+ public static function reviewLogLine( $type='', $action='', $title=null, $params=array() ) {
12561251 $actionsValid = array('approve','approve2','approve-a','approve2-a','unapprove','unapprove2');
12571252 # Show link to page with oldid=x
1258 - if( $type == 'review' && in_array($action,$actionsValid) && is_object($title) && isset($paramArray[0]) ) {
 1253+ if( $type == 'review' && in_array($action,$actionsValid) && is_object($title) && isset($params[0]) ) {
12591254 global $wgUser;
12601255 # Load required messages
12611256 wfLoadExtensionMessages( 'FlaggedRevs' );
12621257 # Don't show diff if param missing or rev IDs are the same
1263 - if( !empty($paramArray[1]) && $paramArray[0] != $paramArray[1] ) {
 1258+ if( !empty($params[1]) && $params[0] != $params[1] ) {
12641259 $r = '(' . $wgUser->getSkin()->makeKnownLinkObj( $title, wfMsgHtml('review-logentry-diff'),
1265 - "oldid={$paramArray[1]}&diff={$paramArray[0]}") . ') ';
 1260+ "oldid={$params[1]}&diff={$params[0]}") . ') ';
12661261 } else {
12671262 $r = '(' . wfMsgHtml('review-logentry-diff') . ')';
12681263 }
12691264 $r .= ' (' . $wgUser->getSkin()->makeKnownLinkObj( $title,
1270 - wfMsgHtml('review-logentry-id',$paramArray[0]),
1271 - "oldid={$paramArray[0]}&diff=prev&diffonly=0") . ')';
 1265+ wfMsgHtml('review-logentry-id',$params[0]),
 1266+ "oldid={$params[0]}&diff=prev&diffonly=0") . ')';
12721267 }
12731268 return true;
12741269 }

Status & tagging log