Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1785-1794 (lines=10) @@
1782
			return $status;
1783
		}
1784
1785
		if ( !$wgUser->isAllowed( 'edit' ) ) {
1786
			if ( $wgUser->isAnon() ) {
1787
				$status->setResult( false, self::AS_READ_ONLY_PAGE_ANON );
1788
				return $status;
1789
			} else {
1790
				$status->fatal( 'readonlytext' );
1791
				$status->value = self::AS_READ_ONLY_PAGE_LOGGED;
1792
				return $status;
1793
			}
1794
		}
1795
1796
		$changingContentModel = false;
1797
		if ( $this->contentModel !== $this->mTitle->getContentModel() ) {
@@ 1798-1806 (lines=9) @@
1795
1796
		$changingContentModel = false;
1797
		if ( $this->contentModel !== $this->mTitle->getContentModel() ) {
1798
			if ( !$wgContentHandlerUseDB ) {
1799
				$status->fatal( 'editpage-cannot-use-custom-model' );
1800
				$status->value = self::AS_CANNOT_USE_CUSTOM_MODEL;
1801
				return $status;
1802
			} elseif ( !$wgUser->isAllowed( 'editcontentmodel' ) ) {
1803
				$status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL );
1804
				return $status;
1805
1806
			}
1807
			$changingContentModel = true;
1808
			$oldContentModel = $this->mTitle->getContentModel();
1809
		}