Code Duplication    Length = 5-6 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1778-1783 (lines=6) @@
1775
		}
1776
1777
		$this->contentLength = strlen( $this->textbox1 );
1778
		if ( $this->contentLength > $wgMaxArticleSize * 1024 ) {
1779
			// Error will be displayed by showEditForm()
1780
			$this->tooBig = true;
1781
			$status->setResult( false, self::AS_CONTENT_TOO_BIG );
1782
			return $status;
1783
		}
1784
1785
		if ( !$wgUser->isAllowed( 'edit' ) ) {
1786
			if ( $wgUser->isAnon() ) {
@@ 2066-2070 (lines=5) @@
2063
2064
		// Check for length errors again now that the section is merged in
2065
		$this->contentLength = strlen( $this->toEditText( $content ) );
2066
		if ( $this->contentLength > $wgMaxArticleSize * 1024 ) {
2067
			$this->tooBig = true;
2068
			$status->setResult( false, self::AS_MAX_ARTICLE_SIZE_EXCEEDED );
2069
			return $status;
2070
		}
2071
2072
		$flags = EDIT_AUTOSUMMARY |
2073
			( $new ? EDIT_NEW : EDIT_UPDATE ) |