r75599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75598‎ | r75599 | r75600 >
Date:23:56, 27 October 2010
Author:reedy
Status:ok
Tags:
Comment:
Fixup last few assignments in if's/loops
Modified paths:
  • /trunk/extensions/CodeReview/api/ApiCodeComments.php (modified) (history)
  • /trunk/extensions/CodeReview/api/ApiCodeRevisions.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/SpecialCode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -449,7 +449,8 @@
450450
451451 // Make list of users to send emails to
452452 $users = $this->getCommentingUsers();
453 - if ( $user = $this->getWikiUser() ) {
 453+ $user = $this->getWikiUser();
 454+ if ( $user ) {
454455 $users[$user->getId()] = $user;
455456 }
456457 // If we've got a spam list, send e-mails to it too
Index: trunk/extensions/CodeReview/api/ApiCodeComments.php
@@ -62,7 +62,7 @@
6363
6464 $count = 0;
6565 $lastTimestamp = 0;
66 - while ( $row = $comments->fetchObject() ) {
 66+ foreach ( $comments as $row ) {
6767 if ( $count == $limit ) {
6868 $this->setContinueEnumParameter( 'start',
6969 wfTimestamp( TS_ISO_8601, $lastTimestamp ) );
Index: trunk/extensions/CodeReview/api/ApiCodeRevisions.php
@@ -61,7 +61,7 @@
6262
6363 $count = 0;
6464 $lastTimestamp = 0;
65 - while ( $row = $revisions->fetchObject() ) {
 65+ foreach ( $revisions as $row ) {
6666 if ( $count == $limit ) {
6767 $this->setContinueEnumParameter( 'start',
6868 wfTimestamp( TS_ISO_8601, $lastTimestamp ) );
Index: trunk/extensions/CodeReview/ui/SpecialCode.php
@@ -17,7 +17,8 @@
1818 $this->setHeaders();
1919 $wgOut->addStyle( "$wgExtensionAssetsPath/CodeReview/codereview.css?$wgCodeReviewStyleVersion" );
2020
21 - if( $view = self::getViewFrom( $subpage ) ) {
 21+ $view = self::getViewFrom( $subpage );
 22+ if( $view ) {
2223 $view->execute();
2324 } else {
2425 $wgOut->addWikiText( wfMsg( 'nosuchactiontext' ) );

Status & tagging log