Index: trunk/extensions/ContactPage/SpecialContact.php |
— | — | @@ -121,6 +121,7 @@ |
122 | 122 | function __construct( $target, $par ) { |
123 | 123 | global $wgRequest, $wgUser; |
124 | 124 | |
| 125 | + $this->wasPosted = $wgRequest->wasPosted(); |
125 | 126 | $this->formType = $wgRequest->getText( 'formtype', $par ); |
126 | 127 | |
127 | 128 | # Check for type in [[Special:Contact/type]]: change pagetext and prefill form fields |
— | — | @@ -214,7 +215,7 @@ |
215 | 216 | } |
216 | 217 | |
217 | 218 | function showForm() { |
218 | | - global $wgOut, $wgUser, $wgContactRequireAll, $wgContactIncludeIP; |
| 219 | + global $wgOut, $wgUser, $wgContactRequireAll, $wgContactIncludeIP, $wgRequest; |
219 | 220 | |
220 | 221 | #TODO: show captcha |
221 | 222 | |
— | — | @@ -287,10 +288,11 @@ |
288 | 289 | </tr>'; |
289 | 290 | } |
290 | 291 | |
| 292 | + $ccme = $this->wasPosted ? $this->cc_me : $wgUser->getBoolOption( 'ccmeonemails' ); |
291 | 293 | $form .= '<tr> |
292 | 294 | <td></td> |
293 | 295 | <td class="mw-input">' . |
294 | | - Xml::checkLabel( wfMsg( 'emailccme' ), 'wpCCMe', 'wpCCMe', $this->cc_me ) . |
| 296 | + Xml::checkLabel( wfMsg( 'emailccme' ), 'wpCCMe', 'wpCCMe', $ccme ) . |
295 | 297 | '<br />' . $this->getCaptcha() . |
296 | 298 | '</td> |
297 | 299 | </tr> |