2015-05-21 15:41:49 +00:00
|
|
|
<?php
|
2018-06-15 21:08:14 +00:00
|
|
|
|
|
|
|
class SpecialCaptcha extends UnlistedSpecialPage {
|
2015-05-21 15:41:49 +00:00
|
|
|
public function __construct() {
|
|
|
|
parent::__construct( 'Captcha' );
|
|
|
|
}
|
|
|
|
|
2018-06-15 21:08:14 +00:00
|
|
|
public function execute( $par ) {
|
2015-05-21 15:41:49 +00:00
|
|
|
$this->setHeaders();
|
|
|
|
|
|
|
|
$instance = ConfirmEditHooks::getInstance();
|
|
|
|
|
2015-10-28 15:52:04 +00:00
|
|
|
switch ( $par ) {
|
2015-05-21 15:41:49 +00:00
|
|
|
case "image":
|
|
|
|
if ( method_exists( $instance, 'showImage' ) ) {
|
2018-06-15 21:08:14 +00:00
|
|
|
// @todo: Do this in a more OOP way
|
2019-05-28 19:00:23 +00:00
|
|
|
/** @phan-suppress-next-line PhanUndeclaredMethod */
|
2015-05-21 15:41:49 +00:00
|
|
|
return $instance->showImage();
|
|
|
|
}
|
|
|
|
case "help":
|
|
|
|
default:
|
|
|
|
return $instance->showHelp();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|