Index: branches/wmf-deployment/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1385,23 +1385,25 @@ |
1386 | 1386 | * @param string $action |
1387 | 1387 | * @param object $title |
1388 | 1388 | * @param array $params |
| 1389 | + * @param string $comment |
| 1390 | + * @param string $rv (review links) |
1389 | 1391 | * @return bool true |
1390 | 1392 | */ |
1391 | | - public static function reviewLogLine( $type='', $action='', $title=null, $params=array() ) { |
| 1393 | + public static function reviewLogLine( $type, $action, $title=null, $params=array(), &$comment, &$rv ) { |
1392 | 1394 | $actionsValid = array('approve','approve2','approve-a','approve2-a','unapprove','unapprove2'); |
1393 | 1395 | # Show link to page with oldid=x |
1394 | | - if( $type == 'review' && in_array($action,$actionsValid) && is_object($title) && isset($params[0]) ) { |
| 1396 | + if( $type == 'review' && is_object($title) && in_array($action,$actionsValid) && isset($params[0]) ) { |
1395 | 1397 | global $wgUser; |
1396 | 1398 | # Load required messages |
1397 | 1399 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
1398 | 1400 | # Don't show diff if param missing or rev IDs are the same |
1399 | 1401 | if( !empty($params[1]) && $params[0] != $params[1] ) { |
1400 | | - $r = '(' . $wgUser->getSkin()->makeKnownLinkObj( $title, wfMsgHtml('review-logentry-diff'), |
| 1402 | + $rv = '(' . $wgUser->getSkin()->makeKnownLinkObj( $title, wfMsgHtml('review-logentry-diff'), |
1401 | 1403 | "oldid={$params[1]}&diff={$params[0]}") . ') '; |
1402 | 1404 | } else { |
1403 | | - $r = '(' . wfMsgHtml('review-logentry-diff') . ')'; |
| 1405 | + $rv = '(' . wfMsgHtml('review-logentry-diff') . ')'; |
1404 | 1406 | } |
1405 | | - $r .= ' (' . $wgUser->getSkin()->makeKnownLinkObj( $title, |
| 1407 | + $rv .= ' (' . $wgUser->getSkin()->makeKnownLinkObj( $title, |
1406 | 1408 | wfMsgHtml('review-logentry-id',$params[0]), |
1407 | 1409 | "oldid={$params[0]}&diff=prev&diffonly=0") . ')'; |
1408 | 1410 | } |