Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1801-1810 (lines=10) @@
1798
			return $status;
1799
		}
1800
1801
		if ( !$user->isAllowed( 'edit' ) ) {
1802
			if ( $user->isAnon() ) {
1803
				$status->setResult( false, self::AS_READ_ONLY_PAGE_ANON );
1804
				return $status;
1805
			} else {
1806
				$status->fatal( 'readonlytext' );
1807
				$status->value = self::AS_READ_ONLY_PAGE_LOGGED;
1808
				return $status;
1809
			}
1810
		}
1811
1812
		$changingContentModel = false;
1813
		if ( $this->contentModel !== $this->mTitle->getContentModel() ) {
@@ 1814-1822 (lines=9) @@
1811
1812
		$changingContentModel = false;
1813
		if ( $this->contentModel !== $this->mTitle->getContentModel() ) {
1814
			if ( !$wgContentHandlerUseDB ) {
1815
				$status->fatal( 'editpage-cannot-use-custom-model' );
1816
				$status->value = self::AS_CANNOT_USE_CUSTOM_MODEL;
1817
				return $status;
1818
			} elseif ( !$user->isAllowed( 'editcontentmodel' ) ) {
1819
				$status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL );
1820
				return $status;
1821
1822
			}
1823
			$changingContentModel = true;
1824
			$oldContentModel = $this->mTitle->getContentModel();
1825
		}