+ /**
+ * The main callback run on edit attempts.
+ * @param EditPage $editPage
+ * @param string $newtext
+ * @param string $section
+ * @param bool $merged
+ * @return bool true to continue saving, false to abort and show a captcha form
+ */
+ function confirmEdit( &$editPage, $newtext, $section, $merged = false ) {
+ if( defined('MW_API') ) {
+ # API mode
+ # The CAPTCHA was already checked and approved
+ return true;
+ }
+ if( !$this->doConfirmEdit( $editPage, $newtext, $section, $merged ) ) {
+ $editPage->showEditForm( array( &$this, 'editCallback' ) );
+ return false;
+ }
+ return true;
+ }
+