http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56310

Revision: 56310
Author:   aaron
Date:     2009-09-14 16:38:35 +0000 (Mon, 14 Sep 2009)

Log Message:
-----------
code style tweaks

Modified Paths:
--------------
    trunk/phase3/includes/HistoryPage.php

Modified: trunk/phase3/includes/HistoryPage.php
===================================================================
--- trunk/phase3/includes/HistoryPage.php       2009-09-14 15:53:29 UTC (rev 
56309)
+++ trunk/phase3/includes/HistoryPage.php       2009-09-14 16:38:35 UTC (rev 
56310)
@@ -216,8 +216,9 @@
                        $wgOut->parse( wfMsgForContent( 'history-feed-empty' ) 
),
                        $this->title->getFullUrl(),
                        wfTimestamp( TS_MW ),
-                               '',
-                       $this->title->getTalkPage()->getFullUrl() );
+                       '',
+                       $this->title->getTalkPage()->getFullUrl()
+               );
        }
 
        /**
@@ -231,12 +232,13 @@
        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 @@
                } 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 @@
 
        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 @@
 
                $tools = array();
 
+               # Rollback and undo links
                if( !is_null( $next ) && is_object( $next ) ) {
                        if( $latest && $this->title->userCan( 'rollback' ) && 
$this->title->userCan( 'edit' ) ) {
                                $tools[] = '<span class="mw-rollback-link">'.



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to