Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| SubmitAction | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| show | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Wrapper for EditAction; sets the session cookie. |
| 4 | * |
| 5 | * @license GPL-2.0-or-later |
| 6 | * @file |
| 7 | * @ingroup Actions |
| 8 | */ |
| 9 | |
| 10 | namespace MediaWiki\Actions; |
| 11 | |
| 12 | /** |
| 13 | * This is the same as EditAction; except that it sets the session cookie. |
| 14 | * |
| 15 | * @ingroup Actions |
| 16 | */ |
| 17 | class SubmitAction extends EditAction { |
| 18 | |
| 19 | /** @inheritDoc */ |
| 20 | public function getName() { |
| 21 | return 'submit'; |
| 22 | } |
| 23 | |
| 24 | /** @inheritDoc */ |
| 25 | public function show() { |
| 26 | // Send a cookie so anons get talk message notifications |
| 27 | $this->getRequest()->getSession()->persist(); |
| 28 | |
| 29 | parent::show(); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /** @deprecated class alias since 1.44 */ |
| 34 | class_alias( SubmitAction::class, 'SubmitAction' ); |