r65162 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65161‎ | r65162 | r65163 >
Date:16:36, 17 April 2010
Author:mah
Status:ok
Tags:
Comment:
re: r65152 fix translatewiki problems
* Recover lost $permErrorsUpload in uploadBase::verifyPermissions
* Use Http::isValidURI() to replace UploadFromUrl::isvalidurl()
Modified paths:
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadFromUrl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromUrl.php
@@ -104,7 +104,7 @@
105105 if( !$request->getVal( 'wpUploadFileURL' ) )
106106 return false;
107107 // check that is a valid url:
108 - return self::isValidUrl( $request->getVal( 'wpUploadFileURL' ) );
 108+ return Http::isValidURI( $request->getVal( 'wpUploadFileURL' ) );
109109 }
110110
111111 private function saveTempFile( $req ) {
Index: trunk/phase3/includes/upload/UploadBase.php
@@ -385,6 +385,7 @@
386386 return true;
387387 }
388388 $permErrors = $nt->getUserPermissionsErrors( 'edit', $user );
 389+ $permErrorsUpload = $nt->getUserPermissionsErrors( 'upload', $user );
389390 $permErrorsCreate = ( $nt->exists() ? array() : $nt->getUserPermissionsErrors( 'create', $user ) );
390391 if( $permErrors || $permErrorsUpload || $permErrorsCreate ) {
391392 $permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsUpload, $permErrors ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65152* New UploadFromUrlJob class to handle Upload-by-Copy...mah02:43, 17 April 2010

Status & tagging log