Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -42,10 +42,10 @@ |
43 | 43 | * 'validation-callback' -- a function name to give you the chance |
44 | 44 | * to impose extra validation on the field input. |
45 | 45 | * @see HTMLForm::validate() |
46 | | - * 'name' -- By default, the 'name' attribute of the input field |
47 | | - * is "wp{$fieldname}". If you want a different name |
48 | | - * (eg one without the "wp" prefix), specify it here and |
49 | | - * it will be used without modification. |
| 46 | + * 'name' -- By default, the 'name' attribute of the input field |
| 47 | + * is "wp{$fieldname}". If you want a different name |
| 48 | + * (eg one without the "wp" prefix), specify it here and |
| 49 | + * it will be used without modification. |
50 | 50 | * |
51 | 51 | * TODO: Document 'section' / 'subsection' stuff |
52 | 52 | */ |
— | — | @@ -211,7 +211,7 @@ |
212 | 212 | $editToken = $wgRequest->getVal( 'wpEditToken' ); |
213 | 213 | |
214 | 214 | $result = false; |
215 | | - if ( $wgUser->matchEditToken( $editToken ) ) { |
| 215 | + if ( $this->getMethod() != 'post' || $wgUser->matchEditToken( $editToken ) ) { |
216 | 216 | $result = $this->trySubmit(); |
217 | 217 | } |
218 | 218 | return $result; |
— | — | @@ -397,8 +397,11 @@ |
398 | 398 | global $wgUser; |
399 | 399 | |
400 | 400 | $html = ''; |
401 | | - $html .= Html::hidden( 'wpEditToken', $wgUser->editToken(), array( 'id' => 'wpEditToken' ) ) . "\n"; |
402 | | - $html .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; |
| 401 | + |
| 402 | + if( $this->getMethod() == 'post' ){ |
| 403 | + $html .= Html::hidden( 'wpEditToken', $wgUser->editToken(), array( 'id' => 'wpEditToken' ) ) . "\n"; |
| 404 | + $html .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; |
| 405 | + } |
403 | 406 | |
404 | 407 | foreach ( $this->mHiddenFields as $data ) { |
405 | 408 | list( $value, $attribs ) = $data; |