Index: trunk/phase3/includes/UploadFromUrl.php |
— | — | @@ -20,7 +20,10 @@ |
21 | 21 | $this->mUrl = trim( $url ); |
22 | 22 | } |
23 | 23 | |
24 | | - function verifyUpload() { |
| 24 | + /** |
| 25 | + * Do the real fetching stuff |
| 26 | + */ |
| 27 | + function fetchFile() { |
25 | 28 | if( stripos($this->mUrl, 'http://') !== 0 && stripos($this->mUrl, 'ftp://') !== 0 ) { |
26 | 29 | return array( |
27 | 30 | 'status' => self::BEFORE_PROCESSING, |
— | — | @@ -34,10 +37,10 @@ |
35 | 38 | 'error' => $res, |
36 | 39 | ); |
37 | 40 | } |
38 | | - return parent::verifyUpload(); |
| 41 | + return self::OK; |
39 | 42 | } |
40 | 43 | |
41 | | - /** |
| 44 | + /** |
42 | 45 | * Safe copy from URL |
43 | 46 | * Returns true if there was an error, false otherwise |
44 | 47 | */ |
Index: trunk/phase3/includes/UploadBase.php |
— | — | @@ -75,6 +75,13 @@ |
76 | 76 | $this->mRemoveTempFile = $removeTempFile; |
77 | 77 | } |
78 | 78 | |
| 79 | + /** |
| 80 | + * Fetch the file. Usually a no-op |
| 81 | + */ |
| 82 | + function fetchFile() { |
| 83 | + return self::OK; |
| 84 | + } |
| 85 | + |
79 | 86 | function verifyUpload() { |
80 | 87 | global $wgUser; |
81 | 88 | |