Index: trunk/extensions/Commentbox/Commentbox.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | $wgHooks['OutputPageBeforeHTML'][] = 'wfExtensionCommentbox_Add'; |
37 | 37 | |
38 | 38 | function wfExtensionCommentbox_Add( &$op, &$text ) { |
39 | | - global $wgUser, $wgRequest, $action, |
| 39 | + global $wgUser, $wgRequest, |
40 | 40 | $wgCommentboxNamespaces, $wgCommentboxRows, |
41 | 41 | $wgCommentboxColumns; |
42 | 42 | |
— | — | @@ -48,7 +48,9 @@ |
49 | 49 | if ( !array_key_exists( $title->getNamespace(), $wgCommentboxNamespaces ) |
50 | 50 | || !$wgCommentboxNamespaces[ $title->getNamespace() ] ) |
51 | 51 | return true; |
52 | | - if ( !( $action == 'view' || $action == 'purge' || $action == 'submit' || $action == '' ) ) |
| 52 | + |
| 53 | + $action = $wgRequest->getVal( 'action', 'view' ); |
| 54 | + if ( !( $action == 'view' || $action == 'purge' || $action == 'submit' ) ) |
53 | 55 | return true; |
54 | 56 | if ( $wgRequest->getCheck( 'wpPreview' ) |
55 | 57 | || $wgRequest->getCheck( 'wpLivePreview' ) |
— | — | @@ -79,7 +81,7 @@ |
80 | 82 | action="$newaction" enctype="multipart/form-data"> |
81 | 83 | $intro |
82 | 84 | <textarea tabindex='1' accesskey="," name="wpComment" id="wpComment" |
83 | | - rows='$wgCommentboxRows' cols='$wpCommentboxColumns' |
| 85 | + rows='$wgCommentboxRows' cols='$wgCommentboxColumns' |
84 | 86 | >$inhalt</textarea> |
85 | 87 | $name |
86 | 88 | <br /> |