Index: branches/ApiEdit_Vodafone/includes/EditPage.php |
— | — | @@ -1,3 +1,4 @@ |
| 2 | + |
2 | 3 | <?php |
3 | 4 | /** |
4 | 5 | * Contains the EditPage class |
— | — | @@ -669,7 +670,6 @@ |
670 | 671 | # Check for spam |
671 | 672 | $matches = array(); |
672 | 673 | if ( $wgSpamRegex && preg_match( $wgSpamRegex, $this->textbox1, $matches ) ) { |
673 | | - $resultDetails['spam'] = $matches[0]; |
674 | 674 | wfProfileOut( "$fname-checks" ); |
675 | 675 | wfProfileOut( $fname ); |
676 | 676 | return self::AS_SPAM_ERROR; |
— | — | @@ -700,7 +700,6 @@ |
701 | 701 | $this->kblength = (int)(strlen( $this->textbox1 ) / 1024); |
702 | 702 | if ( $this->kblength > $wgMaxArticleSize ) { |
703 | 703 | // Error will be displayed by showEditForm() |
704 | | - $this->tooBig = true; |
705 | 704 | wfProfileOut( "$fname-checks" ); |
706 | 705 | wfProfileOut( $fname ); |
707 | 706 | return self::AS_CONTENT_TOO_BIG; |
— | — | @@ -2106,11 +2105,7 @@ |
2107 | 2106 | } |
2108 | 2107 | } |
2109 | 2108 | |
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) { |
2115 | 2110 | global $wgUser, $wgOut; |
2116 | 2111 | |
2117 | 2112 | $resultDetails = false; |
— | — | @@ -2179,7 +2174,7 @@ |
2180 | 2175 | return true; |
2181 | 2176 | |
2182 | 2177 | case self::AS_SPAM_ERROR: |
2183 | | - $this->spamPage ( $resultDetails['spam'] ); |
| 2178 | + $this->spamPage ( $matches[0] ); |
2184 | 2179 | return false; |
2185 | 2180 | |
2186 | 2181 | case self::AS_FILTERING: |