Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
SpecialMobileHistory | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
shouldUseSpecialHistory | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
execute | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | use MediaWiki\SpecialPage\UnlistedSpecialPage; |
4 | use MediaWiki\Title\Title; |
5 | use MediaWiki\User\User; |
6 | |
7 | /** |
8 | * Mobile formatted history of a page |
9 | */ |
10 | class SpecialMobileHistory extends UnlistedSpecialPage { |
11 | public function __construct() { |
12 | parent::__construct( 'History' ); |
13 | } |
14 | |
15 | /** |
16 | * Checks, if the given title supports the use of SpecialMobileHistory. |
17 | * Always returns false. |
18 | * |
19 | * @deprecated 1.41 retained for backwards compatibility; |
20 | * @param Title $title The title to check |
21 | * @param User $user the user to check |
22 | * @return bool True, if SpecialMobileHistory can be used, false otherwise |
23 | */ |
24 | public static function shouldUseSpecialHistory( Title $title, User $user ) { |
25 | return false; |
26 | } |
27 | |
28 | /** |
29 | * @inheritDoc |
30 | */ |
31 | public function execute( $subpage ) { |
32 | $url = wfAppendQuery( wfScript( 'index' ), [ 'title' => $subpage, 'action' => 'history' ] ); |
33 | $this->getOutput()->redirect( $url, '301' ); |
34 | } |
35 | } |