$url = $request->getVal( 'wpUploadFileURL' );
return !empty( $url )
- && Http::isValidURI( $url )
&& $wgUser->isAllowed( 'upload_by_url' );
}
*/
public function fetchFile( $httpOptions = array() ) {
if ( !Http::isValidURI( $this->mUrl ) ) {
- return Status::newFatal( 'http-invalid-url' );
+ return Status::newFatal( 'http-invalid-url', $this->mUrl );
}
if ( !self::isAllowedHost( $this->mUrl ) ) {
wfDebugLog(
'fileupload',
'Short write ' . $this->nbytes . '/' . strlen( $buffer ) .
- ' bytes, aborting with ' . $this->mFileSize . ' uploaded so far'
+ ' bytes, aborting with ' . $this->mFileSize . ' uploaded so far'
);
fclose( $this->mTmpHandle );
$this->mTmpHandle = false;