Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | * @return array |
85 | 85 | */ |
86 | 86 | public static function getRequiredPermissions() { |
87 | | - return array( 'upload', 'create', 'edit' ); |
| 87 | + return array( 'upload', 'edit' ); |
88 | 88 | } |
89 | 89 | /** |
90 | 90 | * Returns true if the user can use this upload module or else a string |
— | — | @@ -396,7 +396,11 @@ |
397 | 397 | } |
398 | 398 | $permErrors = $nt->getUserPermissionsErrors( 'edit', $user ); |
399 | 399 | $permErrorsUpload = $nt->getUserPermissionsErrors( 'upload', $user ); |
400 | | - $permErrorsCreate = ( $nt->exists() ? array() : $nt->getUserPermissionsErrors( 'create', $user ) ); |
| 400 | + if ( $nt->exists() ) { |
| 401 | + $permErrorsCreate = $nt->getUserPermissionsErrors( 'createpage', $user ); |
| 402 | + } else { |
| 403 | + $permErrorsCreate = array(); |
| 404 | + } |
401 | 405 | if( $permErrors || $permErrorsUpload || $permErrorsCreate ) { |
402 | 406 | $permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsUpload, $permErrors ) ); |
403 | 407 | $permErrors = array_merge( $permErrors, wfArrayDiff2( $permErrorsCreate, $permErrors ) ); |