Index: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php |
— | — | @@ -173,16 +173,16 @@ |
174 | 174 | $basefilecontents = ""; |
175 | 175 | // use cURL to get the SVN contents |
176 | 176 | if ( preg_match( "/^http/", $basefile ) ) { |
177 | | - while(empty($basefilecontents) && $attempts <= $wgLocalisationUpdateRetryAttempts) { |
| 177 | + while( !$basefilecontents && $attempts <= $wgLocalisationUpdateRetryAttempts) { |
178 | 178 | if($attempts > 0) |
179 | 179 | sleep(1); |
180 | 180 | $basefilecontents = Http::get( $basefile ); |
181 | 181 | $attempts++; |
182 | 182 | } |
183 | | - if ( empty( $basefilecontents ) ) { |
| 183 | + if ( !$basefilecontents ) { |
184 | 184 | self::myLog( "Cannot get the contents of " . $basefile . " (curl)" ); |
185 | 185 | return false; |
186 | | - } |
| 186 | + } |
187 | 187 | } else {// otherwise try file_get_contents |
188 | 188 | if ( !$basefilecontents = file_get_contents( $basefile ) ) { |
189 | 189 | self::myLog( "Cannot get the contents of " . $basefile ); |