Index: trunk/phase3/includes/upload/UploadFromUrl.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | if( !$request->getVal( 'wpUploadFileURL' ) ) |
106 | 106 | return false; |
107 | 107 | // check that is a valid url: |
108 | | - return self::isValidUrl( $request->getVal( 'wpUploadFileURL' ) ); |
| 108 | + return Http::isValidURI( $request->getVal( 'wpUploadFileURL' ) ); |
109 | 109 | } |
110 | 110 | |
111 | 111 | private function saveTempFile( $req ) { |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -385,6 +385,7 @@ |
386 | 386 | return true; |
387 | 387 | } |
388 | 388 | $permErrors = $nt->getUserPermissionsErrors( 'edit', $user ); |
| 389 | + $permErrorsUpload = $nt->getUserPermissionsErrors( 'upload', $user ); |
389 | 390 | $permErrorsCreate = ( $nt->exists() ? array() : $nt->getUserPermissionsErrors( 'create', $user ) ); |
390 | 391 | if( $permErrors || $permErrorsUpload || $permErrorsCreate ) { |
391 | 392 | $permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsUpload, $permErrors ) ); |