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