Code Duplication    Length = 15-15 lines in 2 locations

includes/specials/SpecialNewimages.php 1 location

@@ 58-72 (lines=15) @@
55
	/**
56
	 * Send the text to be displayed above the options
57
	 */
58
	function setTopText() {
59
		global $wgContLang;
60
61
		$message = $this->msg( 'newimagestext' )->inContentLanguage();
62
		if ( !$message->isDisabled() ) {
63
			$this->getOutput()->addWikiText(
64
				Html::rawElement( 'p',
65
					[ 'lang' => $wgContLang->getHtmlCode(), 'dir' => $wgContLang->getDir() ],
66
					"\n" . $message->plain() . "\n"
67
				),
68
				/* $lineStart */ false,
69
				/* $interface */ false
70
			);
71
		}
72
	}
73
}
74

includes/specials/SpecialRecentchanges.php 1 location

@@ 467-481 (lines=15) @@
464
	 *
465
	 * @param FormOptions $opts Unused
466
	 */
467
	function setTopText( FormOptions $opts ) {
468
		global $wgContLang;
469
470
		$message = $this->msg( 'recentchangestext' )->inContentLanguage();
471
		if ( !$message->isDisabled() ) {
472
			$this->getOutput()->addWikiText(
473
				Html::rawElement( 'div',
474
					[ 'lang' => $wgContLang->getHtmlCode(), 'dir' => $wgContLang->getDir() ],
475
					"\n" . $message->plain() . "\n"
476
				),
477
				/* $lineStart */ true,
478
				/* $interface */ false
479
			);
480
		}
481
	}
482
483
	/**
484
	 * Get options to be displayed in a form