Index: trunk/phase3/includes/filerepo/ICRepo.php |
— | — | @@ -182,15 +182,17 @@ |
183 | 183 | return $image; |
184 | 184 | } |
185 | 185 | |
186 | | - /** |
| 186 | + /** |
187 | 187 | * Use cURL to read the content of a URL into a string |
| 188 | + * ref: http://groups-beta.google.com/group/comp.lang.php/browse_thread/thread/8efbbaced3c45e3c/d63c7891cf8e380b?lnk=raot |
188 | 189 | * @param string $url - the URL to fetch |
189 | 190 | * @param resource $fp - filename to write file contents to |
190 | 191 | * @param boolean $bg - call cURL in the background (don't hang page until complete) |
191 | 192 | * @param int $timeout - cURL connect timeout |
192 | 193 | */ |
193 | | - function curl_file_get_contents($url, $fp, $bg=TRUE, $timeout = 1){//ref: http://groups-beta.google.com/group/comp.lang.php/browse_thread/thread/8efbbaced3c45e3c/d63c7891cf8e380b?lnk=raot |
194 | | - {//call curl in the background to download the file |
| 194 | + function curl_file_get_contents($url, $fp, $bg=TRUE, $timeout = 1) { |
| 195 | + { |
| 196 | + # Call curl in the background to download the file |
195 | 197 | $cmd = 'curl '.wfEscapeShellArg($url).' -o '.$fp.' &'; |
196 | 198 | wfDebug('Curl download initiated='.$cmd ); |
197 | 199 | $success = false; |
— | — | @@ -212,8 +214,6 @@ |
213 | 215 | } |
214 | 216 | return $this->dbConn; |
215 | 217 | } |
216 | | - |
217 | | - |
218 | 218 | |
219 | 219 | /** |
220 | 220 | * Record a file upload in the upload log and the image table |