Code Duplication    Length = 7-7 lines in 2 locations

includes/specials/SpecialProtectedtitles.php 1 location

@@ 165-171 (lines=7) @@
162
		$options = [];
163
164
		// First pass to load the log names
165
		foreach ( $this->getConfig()->get( 'RestrictionLevels' ) as $type ) {
166
			if ( $type != '' && $type != '*' ) {
167
				// Messages: restriction-level-sysop, restriction-level-autoconfirmed
168
				$text = $this->msg( "restriction-level-$type" )->text();
169
				$m[$text] = $type;
170
			}
171
		}
172
173
		// Is there only one level (aside from "all")?
174
		if ( count( $m ) <= 2 ) {

includes/specials/SpecialProtectedpages.php 1 location

@@ 251-257 (lines=7) @@
248
		$options = [];
249
250
		// First pass to load the log names
251
		foreach ( $this->getConfig()->get( 'RestrictionLevels' ) as $type ) {
252
			// Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed'
253
			if ( $type != '' && $type != '*' ) {
254
				$text = $this->msg( "restriction-level-$type" )->text();
255
				$m[$text] = $type;
256
			}
257
		}
258
259
		// Third pass generates sorted XHTML content
260
		foreach ( $m as $text => $type ) {