Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -319,6 +319,8 @@ |
320 | 320 | } |
321 | 321 | |
322 | 322 | $permErrors = $this->mTitle->getUserPermissionsErrors( 'edit', $wgUser); |
| 323 | + if( !$this->mTitle->exists() ) |
| 324 | + $permErrors += $this->mTitle->getUserPermissionsErrors( 'create', $wgUser); |
323 | 325 | |
324 | 326 | # Ignore some permissions errors. |
325 | 327 | $remove = array(); |
— | — | @@ -342,7 +344,7 @@ |
343 | 345 | # array_diff returns elements in $permErrors that are not in $remove. |
344 | 346 | $permErrors = array_diff( $permErrors, $remove ); |
345 | 347 | |
346 | | - if ($permErrors != array()) |
| 348 | + if ( !empty($permErrors) ) |
347 | 349 | { |
348 | 350 | wfDebug( "$fname: User can't edit\n" ); |
349 | 351 | $wgOut->readOnlyPage( $this->getContent(), true, $permErrors ); |