r57581 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57580‎ | r57581 | r57582 >
Date:19:08, 9 October 2009
Author:aaron
Status:ok
Tags:
Comment:
disable form correctly
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php
@@ -19,7 +19,6 @@
2020 $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
2121 # Allow unprivileged users to at least view the settings
2222 $this->isAllowed = $wgUser->isAllowed( 'stablesettings' );
23 - $this->disabledAttrib = !$this->isAllowed ? array( 'disabled' => 'disabled' ) : array();
2423 # Let anyone view, but not submit...
2524 if( $wgRequest->wasPosted() ) {
2625 if( $wgUser->isBlocked( !$confirm ) ) {
@@ -71,8 +70,10 @@
7271 if( $this->isAllowed && !($this->page->userCan('edit') && $this->page->userCan('review')) ) {
7372 $this->isAllowed = false;
7473 }
75 -
76 - // Show form or submit...
 74+ # Disable some elements as needed
 75+ $this->disabledAttrib = !$this->isAllowed ?
 76+ array( 'disabled' => 'disabled' ) : array();
 77+ # Show form or submit...
7778 if( $this->isAllowed && $isValid && $confirm ) {
7879 $status = $this->submit();
7980 if( $status === true ) {

Status & tagging log