mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-21 04:13:03 +00:00
48a60aa762
Change-Id: I75f34c66f1c1968cfb9a3e1932068ec2420e0fa6
29 lines
630 B
PHP
29 lines
630 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\ConfirmEdit\Specials;
|
|
|
|
use MediaWiki\Extension\ConfirmEdit\Hooks;
|
|
use MediaWiki\SpecialPage\UnlistedSpecialPage;
|
|
|
|
class SpecialCaptcha extends UnlistedSpecialPage {
|
|
public function __construct() {
|
|
parent::__construct( 'Captcha' );
|
|
}
|
|
|
|
/** @inheritDoc */
|
|
public function execute( $par ) {
|
|
$this->setHeaders();
|
|
|
|
$instance = Hooks::getInstance();
|
|
|
|
if ( $par === 'image' && method_exists( $instance, 'showImage' ) ) {
|
|
// @todo: Do this in a more OOP way
|
|
/** @phan-suppress-next-line PhanUndeclaredMethod */
|
|
$instance->showImage();
|
|
return;
|
|
}
|
|
|
|
$instance->showHelp();
|
|
}
|
|
}
|