Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -397,6 +397,12 @@ |
398 | 398 | if ( !$is_query ) { |
399 | 399 | // $userCanEditPage = ( $wgUser->isAllowed( 'edit' ) && $this->mPageTitle->userCan( 'edit' ) ); |
400 | 400 | $permissionErrors = $this->mPageTitle->getUserPermissionsErrors( 'edit', $wgUser ); |
| 401 | + // The handling of $wgReadOnly and $wgReadOnlyFile |
| 402 | + // has to be done separately. |
| 403 | + if ( wfReadOnly() ) { |
| 404 | + global $wgReadOnly; |
| 405 | + $permissionErrors = array( array( 'readonlytext', array ( wfReadOnlyReason() ) ) ); |
| 406 | + } |
401 | 407 | $userCanEditPage = count( $permissionErrors ) == 0; |
402 | 408 | wfRunHooks( 'sfUserCanEditPage', array( $this->mPageTitle, &$userCanEditPage ) ); |
403 | 409 | } |