| 1 |
<?php |
| 2 |
|
| 3 |
namespace MediaWiki\Extension\ConfirmEdit\Specials; |
| 4 |
|
| 5 |
use MediaWiki\Extension\ConfirmEdit\Hooks; |
| 6 |
use MediaWiki\SpecialPage\UnlistedSpecialPage; |
| 7 |
|
| 8 |
class SpecialCaptcha extends UnlistedSpecialPage { |
| 9 |
public function __construct() { |
| 10 |
parent::__construct( 'Captcha' ); |
| 11 |
} |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
public function execute( $par ) { |
| 17 |
$this->setHeaders(); |
| 18 |
|
| 19 |
$instance = Hooks::getInstance(); |
| 20 |
|
| 21 |
if ( $par === 'image' && method_exists( $instance, 'showImage' ) ) { |
| 22 |
|
| 23 |
|
| 24 |
$instance->showImage(); |
| 25 |
return; |
| 26 |
} |
| 27 |
|
| 28 |
$instance->showHelp(); |
| 29 |
} |
| 30 |
} |