pickImage(); if ( !$info ) { $resultArr['captcha']['error'] = 'Out of images'; return; } $index = $this->storeCaptcha( $info ); $title = SpecialPage::getTitleFor( 'Captcha', 'image' ); $resultArr['captcha']['type'] = 'image'; $resultArr['captcha']['mime'] = 'image/png'; $resultArr['captcha']['id'] = $index; $resultArr['captcha']['url'] = $title->getLocalUrl( 'wpCaptchaId=' . urlencode( $index ) ); } */ /** * Insert the captcha prompt into the edit form. */ function getForm() { global $wgLogo; return "

" . Html::element( 'img', array( 'src' => $wgLogo, 'alt' => '' ) ) . "

\n"; } /** * Show a message asking the user to enter a captcha on edit * The result will be treated as wiki text * * @param $action string Action being performed * @return string */ /* function getMessage( $action ) { $name = 'fancycaptcha-' . $action; $text = wfMessage( $name )->text(); # Obtain a more tailored message, if possible, otherwise, fall back to # the default for edits return wfMessage( $name, $text )->isDisabled() ? wfMessage( 'fancycaptcha-edit' )->text() : $text; } */ }