Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -78,20 +78,12 @@ |
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
82 | | - * Returns an array of permissions that is required to upload a file |
83 | | - * |
84 | | - * @return array |
85 | | - */ |
86 | | - public static function getRequiredPermissions() { |
87 | | - return array( 'upload', 'edit' ); |
88 | | - } |
89 | | - /** |
90 | 82 | * Returns true if the user can use this upload module or else a string |
91 | 83 | * identifying the missing permission. |
92 | 84 | * Can be overriden by subclasses. |
93 | 85 | */ |
94 | 86 | public static function isAllowed( $user ) { |
95 | | - foreach ( self::getRequiredPermissions() as $permission ) { |
| 87 | + foreach ( array( 'upload', 'edit' ) as $permission ) { |
96 | 88 | if ( !$user->isAllowed( $permission ) ) { |
97 | 89 | return $permission; |
98 | 90 | } |