Code Duplication    Length = 5-7 lines in 2 locations

includes/Title.php 2 locations

@@ 2095-2099 (lines=5) @@
2092
		# XXX: right 'editusercssjs' is deprecated, for backward compatibility only
2093
		if ( $action != 'patrol' && !$user->isAllowed( 'editusercssjs' ) ) {
2094
			if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) {
2095
				if ( $this->isCssSubpage() && !$user->isAllowedAny( 'editmyusercss', 'editusercss' ) ) {
2096
					$errors[] = [ 'mycustomcssprotected', $action ];
2097
				} elseif ( $this->isJsSubpage() && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' ) ) {
2098
					$errors[] = [ 'mycustomjsprotected', $action ];
2099
				}
2100
			} else {
2101
				if ( $this->isCssSubpage() && !$user->isAllowed( 'editusercss' ) ) {
2102
					$errors[] = [ 'customcssprotected', $action ];
@@ 2100-2106 (lines=7) @@
2097
				} elseif ( $this->isJsSubpage() && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' ) ) {
2098
					$errors[] = [ 'mycustomjsprotected', $action ];
2099
				}
2100
			} else {
2101
				if ( $this->isCssSubpage() && !$user->isAllowed( 'editusercss' ) ) {
2102
					$errors[] = [ 'customcssprotected', $action ];
2103
				} elseif ( $this->isJsSubpage() && !$user->isAllowed( 'edituserjs' ) ) {
2104
					$errors[] = [ 'customjsprotected', $action ];
2105
				}
2106
			}
2107
		}
2108
2109
		return $errors;