Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1755-1764 (lines=10) @@
1752
			return $status;
1753
		}
1754
1755
		if ( !$wgUser->isAllowed( 'edit' ) ) {
1756
			if ( $wgUser->isAnon() ) {
1757
				$status->setResult( false, self::AS_READ_ONLY_PAGE_ANON );
1758
				return $status;
1759
			} else {
1760
				$status->fatal( 'readonlytext' );
1761
				$status->value = self::AS_READ_ONLY_PAGE_LOGGED;
1762
				return $status;
1763
			}
1764
		}
1765
1766
		$changingContentModel = false;
1767
		if ( $this->contentModel !== $this->mTitle->getContentModel() ) {
@@ 1768-1776 (lines=9) @@
1765
1766
		$changingContentModel = false;
1767
		if ( $this->contentModel !== $this->mTitle->getContentModel() ) {
1768
			if ( !$wgContentHandlerUseDB ) {
1769
				$status->fatal( 'editpage-cannot-use-custom-model' );
1770
				$status->value = self::AS_CANNOT_USE_CUSTOM_MODEL;
1771
				return $status;
1772
			} elseif ( !$wgUser->isAllowed( 'editcontentmodel' ) ) {
1773
				$status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL );
1774
				return $status;
1775
1776
			}
1777
			$changingContentModel = true;
1778
			$oldContentModel = $this->mTitle->getContentModel();
1779
		}