Code Duplication    Length = 5-5 lines in 2 locations

includes/page/ImagePage.php 2 locations

@@ 1086-1090 (lines=5) @@
1083
		foreach ( $langChoices as $lang ) {
1084
			$code = wfBCP47( $lang );
1085
			$name = Language::fetchLanguageName( $code, $this->getContext()->getLanguage()->getCode() );
1086
			if ( $name !== '' ) {
1087
				$display = $this->getContext()->msg( 'img-lang-opt', $code, $name )->text();
1088
			} else {
1089
				$display = $code;
1090
			}
1091
			$opts .= "\n" . Xml::option( $display, $code, $curLang === $code );
1092
			if ( $curLang === $code ) {
1093
				$haveCurrentLang = true;
@@ 1110-1114 (lines=5) @@
1107
		}
1108
		if ( !$haveCurrentLang && $defaultLang !== $curLang ) {
1109
			$name = Language::fetchLanguageName( $curLang, $this->getContext()->getLanguage()->getCode() );
1110
			if ( $name !== '' ) {
1111
				$display = $this->getContext()->msg( 'img-lang-opt', $curLang, $name )->text();
1112
			} else {
1113
				$display = $curLang;
1114
			}
1115
			$opts = Xml::option( $display, $curLang, true ) . $opts;
1116
		}
1117