MediaWiki REL1_34
SpecialCaptcha.php
Go to the documentation of this file.
1<?php
2
4 public function __construct() {
5 parent::__construct( 'Captcha' );
6 }
7
8 public function execute( $par ) {
9 $this->setHeaders();
10
11 $instance = ConfirmEditHooks::getInstance();
12
13 switch ( $par ) {
14 case "image":
15 if ( method_exists( $instance, 'showImage' ) ) {
16 // @todo: Do this in a more OOP way
18 return $instance->showImage();
19 }
20 case "help":
21 default:
22 return $instance->showHelp();
23 }
24 }
25}
execute( $par)
Default execute method Checks user permissions.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Shortcut to construct a special page which is unlisted by default.