From bd311e515acfbad97fa1548f8328a2bc36526fa5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 14 Sep 2009 16:38:35 +0000 Subject: [PATCH] code style tweaks --- includes/HistoryPage.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/includes/HistoryPage.php b/includes/HistoryPage.php index f3d8fa700e..9e8988ec8d 100644 --- a/includes/HistoryPage.php +++ b/includes/HistoryPage.php @@ -216,8 +216,9 @@ class HistoryPage { $wgOut->parse( wfMsgForContent( 'history-feed-empty' ) ), $this->title->getFullUrl(), wfTimestamp( TS_MW ), - '', - $this->title->getTalkPage()->getFullUrl() ); + '', + $this->title->getTalkPage()->getFullUrl() + ); } /** @@ -231,12 +232,13 @@ class HistoryPage { function feedItem( $row ) { $rev = new Revision( $row ); $rev->setTitle( $this->title ); - $text = FeedUtils::formatDiffRow( $this->title, - $this->title->getPreviousRevisionID( $rev->getId() ), - $rev->getId(), - $rev->getTimestamp(), - $rev->getComment() ); - + $text = FeedUtils::formatDiffRow( + $this->title, + $this->title->getPreviousRevisionID( $rev->getId() ), + $rev->getId(), + $rev->getTimestamp(), + $rev->getComment() + ); if( $rev->getComment() == '' ) { global $wgContLang; $title = wfMsgForContent( 'history-feed-item-nocomment', @@ -245,14 +247,14 @@ class HistoryPage { } else { $title = $rev->getUserText() . wfMsgForContent( 'colon-separator' ) . FeedItem::stripComment( $rev->getComment() ); } - return new FeedItem( $title, $text, $this->title->getFullUrl( 'diff=' . $rev->getId() . '&oldid=prev' ), $rev->getTimestamp(), $rev->getUserText(), - $this->title->getTalkPage()->getFullUrl() ); + $this->title->getTalkPage()->getFullUrl() + ); } } @@ -301,7 +303,7 @@ class HistoryPager extends ReverseChronologicalPager { function formatRow( $row ) { if( $this->lastRow ) { - $latest = $this->counter == 1 && $this->mIsFirst; + $latest = ($this->counter == 1 && $this->mIsFirst); $firstInList = $this->counter == 1; $s = $this->historyLine( $this->lastRow, $row, $this->counter++, $this->title->getNotificationTimestamp(), $latest, $firstInList ); @@ -473,6 +475,7 @@ class HistoryPager extends ReverseChronologicalPager { $tools = array(); + # Rollback and undo links if( !is_null( $next ) && is_object( $next ) ) { if( $latest && $this->title->userCan( 'rollback' ) && $this->title->userCan( 'edit' ) ) { $tools[] = ''. -- 2.20.1