r62816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62815‎ | r62816 | r62817 >
Date:10:42, 22 February 2010
Author:happydog
Status:ok
Tags:
Comment:
CodeReview: From Tim Starling, in response to r62508 (http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62508#c5934): "Variable names should start with a lower-case letter, e.g. "$result" instead of "$Result". Put braces around conditional blocks." - DONE
Modified paths:
  • /trunk/extensions/CodeReview/backend/Subversion.php (modified) (history)
  • /trunk/extensions/CodeReview/svnImport.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/Subversion.php
@@ -109,13 +109,14 @@
110110 $this->getExtraArgs(),
111111 wfEscapeShellArg( $this->mRepo ) );
112112
113 - $Result = wfShellExec( $command );
114 - if ( $Result == "" )
 113+ $result = wfShellExec( $command );
 114+ if ( $result == "" ) {
115115 return false;
116 - elseif ( strpos( $Result, "No repository found" ) !== false )
 116+ } elseif ( strpos( $result, "No repository found" ) !== false ) {
117117 return false;
118 - else
 118+ } else {
119119 return true;
 120+ }
120121 }
121122
122123 function getFile( $path, $rev = null ) {
Index: trunk/extensions/CodeReview/svnImport.php
@@ -64,8 +64,9 @@
6565
6666 echo "Syncing repo $repoName from r$start to HEAD...\n";
6767
68 - if ( !$svn->canConnect() )
 68+ if ( !$svn->canConnect() ) {
6969 die( "Unable to connect to repository.\n" );
 70+ }
7071
7172 while ( true ) {
7273 $log = $svn->getLog( '', $start, $start + $chunkSize - 1 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62508CodeReview: Added a canConnect() function to the SubversionAdaptor class. Th...happydog09:59, 15 February 2010

Status & tagging log