mediawiki-extensions-Confir.../includes/Specials/SpecialCaptcha.php

29 lines
630 B
PHP
Raw Normal View History

<?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();
}
}