]> ToastFreeware Gitweb - toast/cookiecaptcha.git/blobdiff - ConfirmEdit_body.php
Update ConfirmEdit for r50132
[toast/cookiecaptcha.git] / ConfirmEdit_body.php
index 2e7fd048304da42aac10cc38b062edb7b933674e..1f93ecfdb0ace4ac60f5c69c71c781e36fce90f1 100644 (file)
@@ -54,7 +54,8 @@ class CaptchaSpecialPage extends UnlistedSpecialPage {
                $instance = ConfirmEditHooks::getInstance();
                switch( $par ) {
                case "image":
-                       return $instance->showImage();
+                       if( method_exists($instance,'showImage') )
+                               return $instance->showImage();
                case "help":
                default:
                        return $instance->showHelp();
@@ -479,8 +480,7 @@ class SimpleCaptcha {
         * @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;