r26531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26530‎ | r26531 | r26532 >
Date:08:38, 9 October 2007
Author:rfrisar
Status:old
Tags:
Comment:
svnmerge with trunk till rev 26168
Modified paths:
  • /branches/ApiEdit_Vodafone/includes/EditPage.php (modified) (history)

Diff [purge]

Index: branches/ApiEdit_Vodafone/includes/EditPage.php
@@ -1,3 +1,4 @@
 2+
23 <?php
34 /**
45 * Contains the EditPage class
@@ -669,7 +670,6 @@
670671 # Check for spam
671672 $matches = array();
672673 if ( $wgSpamRegex && preg_match( $wgSpamRegex, $this->textbox1, $matches ) ) {
673 - $resultDetails['spam'] = $matches[0];
674674 wfProfileOut( "$fname-checks" );
675675 wfProfileOut( $fname );
676676 return self::AS_SPAM_ERROR;
@@ -700,7 +700,6 @@
701701 $this->kblength = (int)(strlen( $this->textbox1 ) / 1024);
702702 if ( $this->kblength > $wgMaxArticleSize ) {
703703 // Error will be displayed by showEditForm()
704 - $this->tooBig = true;
705704 wfProfileOut( "$fname-checks" );
706705 wfProfileOut( $fname );
707706 return self::AS_CONTENT_TOO_BIG;
@@ -2106,11 +2105,7 @@
21072106 }
21082107 }
21092108
2110 - /**
2111 - * Attempt submission
2112 - * @return bool false if output is done, true if the rest of the form should be displayed
2113 - */
2114 - function attemptSave() {
 2109+ function processAttemptSave($value) {
21152110 global $wgUser, $wgOut;
21162111
21172112 $resultDetails = false;
@@ -2179,7 +2174,7 @@
21802175 return true;
21812176
21822177 case self::AS_SPAM_ERROR:
2183 - $this->spamPage ( $resultDetails['spam'] );
 2178+ $this->spamPage ( $matches[0] );
21842179 return false;
21852180
21862181 case self::AS_FILTERING:

Status & tagging log