r51711 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51710‎ | r51711 | r51712 >
Date:22:10, 10 June 2009
Author:demon
Status:deferred
Tags:
Comment:
Minor tweak: shouldn't need empty() on the results from Http::get().
Modified paths:
  • /trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php
@@ -173,16 +173,16 @@
174174 $basefilecontents = "";
175175 // use cURL to get the SVN contents
176176 if ( preg_match( "/^http/", $basefile ) ) {
177 - while(empty($basefilecontents) && $attempts <= $wgLocalisationUpdateRetryAttempts) {
 177+ while( !$basefilecontents && $attempts <= $wgLocalisationUpdateRetryAttempts) {
178178 if($attempts > 0)
179179 sleep(1);
180180 $basefilecontents = Http::get( $basefile );
181181 $attempts++;
182182 }
183 - if ( empty( $basefilecontents ) ) {
 183+ if ( !$basefilecontents ) {
184184 self::myLog( "Cannot get the contents of " . $basefile . " (curl)" );
185185 return false;
186 - }
 186+ }
187187 } else {// otherwise try file_get_contents
188188 if ( !$basefilecontents = file_get_contents( $basefile ) ) {
189189 self::myLog( "Cannot get the contents of " . $basefile );

Status & tagging log