r56310 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56309‎ | r56310 | r56311 >
Date:16:38, 14 September 2009
Author:aaron
Status:ok
Tags:
Comment:
code style tweaks
Modified paths:
  • /trunk/phase3/includes/HistoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HistoryPage.php
@@ -216,8 +216,9 @@
217217 $wgOut->parse( wfMsgForContent( 'history-feed-empty' ) ),
218218 $this->title->getFullUrl(),
219219 wfTimestamp( TS_MW ),
220 - '',
221 - $this->title->getTalkPage()->getFullUrl() );
 220+ '',
 221+ $this->title->getTalkPage()->getFullUrl()
 222+ );
222223 }
223224
224225 /**
@@ -231,12 +232,13 @@
232233 function feedItem( $row ) {
233234 $rev = new Revision( $row );
234235 $rev->setTitle( $this->title );
235 - $text = FeedUtils::formatDiffRow( $this->title,
236 - $this->title->getPreviousRevisionID( $rev->getId() ),
237 - $rev->getId(),
238 - $rev->getTimestamp(),
239 - $rev->getComment() );
240 -
 236+ $text = FeedUtils::formatDiffRow(
 237+ $this->title,
 238+ $this->title->getPreviousRevisionID( $rev->getId() ),
 239+ $rev->getId(),
 240+ $rev->getTimestamp(),
 241+ $rev->getComment()
 242+ );
241243 if( $rev->getComment() == '' ) {
242244 global $wgContLang;
243245 $title = wfMsgForContent( 'history-feed-item-nocomment',
@@ -245,14 +247,14 @@
246248 } else {
247249 $title = $rev->getUserText() . wfMsgForContent( 'colon-separator' ) . FeedItem::stripComment( $rev->getComment() );
248250 }
249 -
250251 return new FeedItem(
251252 $title,
252253 $text,
253254 $this->title->getFullUrl( 'diff=' . $rev->getId() . '&oldid=prev' ),
254255 $rev->getTimestamp(),
255256 $rev->getUserText(),
256 - $this->title->getTalkPage()->getFullUrl() );
 257+ $this->title->getTalkPage()->getFullUrl()
 258+ );
257259 }
258260 }
259261
@@ -301,7 +303,7 @@
302304
303305 function formatRow( $row ) {
304306 if( $this->lastRow ) {
305 - $latest = $this->counter == 1 && $this->mIsFirst;
 307+ $latest = ($this->counter == 1 && $this->mIsFirst);
306308 $firstInList = $this->counter == 1;
307309 $s = $this->historyLine( $this->lastRow, $row, $this->counter++,
308310 $this->title->getNotificationTimestamp(), $latest, $firstInList );
@@ -473,6 +475,7 @@
474476
475477 $tools = array();
476478
 479+ # Rollback and undo links
477480 if( !is_null( $next ) && is_object( $next ) ) {
478481 if( $latest && $this->title->userCan( 'rollback' ) && $this->title->userCan( 'edit' ) ) {
479482 $tools[] = '<span class="mw-rollback-link">'.

Status & tagging log