$instance = ConfirmEditHooks::getInstance();
switch( $par ) {
case "image":
- return $instance->showImage();
+ if( method_exists($instance,'showImage') )
+ return $instance->showImage();
case "help":
default:
return $instance->showHelp();
* @return bool true to continue saving, false to abort and show a captcha form
*/
function confirmEdit( &$editPage, $newtext, $section, $merged = false ) {
- global $wgTitle;
- if( is_null( $wgTitle ) ) {
+ if( defined('API') ) {
# API mode
# The CAPTCHA was already checked and approved
return true;