Code Duplication    Length = 11-13 lines in 3 locations

includes/actions/Action.php 1 location

@@ 390-402 (lines=13) @@
387
	 * @param bool $overrideBaseUrl Whether $url is a full URL, to avoid MW.o.
388
	 * @since 1.25
389
	 */
390
	public function addHelpLink( $to, $overrideBaseUrl = false ) {
391
		global $wgContLang;
392
		$msg = wfMessage( $wgContLang->lc(
393
			Action::getActionName( $this->getContext() )
394
			) . '-helppage' );
395
396
		if ( !$msg->isDisabled() ) {
397
			$helpUrl = Skin::makeUrl( $msg->plain() );
398
			$this->getOutput()->addHelpLink( $helpUrl, true );
399
		} else {
400
			$this->getOutput()->addHelpLink( $to, $overrideBaseUrl );
401
		}
402
	}
403
404
	/**
405
	 * The main action entry point.  Do all output for display and send it to the context

includes/specialpage/SpecialPage.php 1 location

@@ 785-795 (lines=11) @@
782
	 * @param bool $overrideBaseUrl Whether $url is a full URL, to avoid MW.o.
783
	 * @since 1.25
784
	 */
785
	public function addHelpLink( $to, $overrideBaseUrl = false ) {
786
		global $wgContLang;
787
		$msg = $this->msg( $wgContLang->lc( $this->getName() ) . '-helppage' );
788
789
		if ( !$msg->isDisabled() ) {
790
			$helpUrl = Skin::makeUrl( $msg->plain() );
791
			$this->getOutput()->addHelpLink( $helpUrl, true );
792
		} else {
793
			$this->getOutput()->addHelpLink( $to, $overrideBaseUrl );
794
		}
795
	}
796
797
	/**
798
	 * Get the group that the special page belongs in on Special:SpecialPage

includes/page/Article.php 1 location

@@ 1576-1588 (lines=13) @@
1573
	 * @param bool $overrideBaseUrl Whether $url is a full URL, to avoid MW.o.
1574
	 * @since 1.25
1575
	 */
1576
	public function addHelpLink( $to, $overrideBaseUrl = false ) {
1577
		$msg = wfMessage(
1578
			'namespace-' . $this->getTitle()->getNamespace() . '-helppage'
1579
		);
1580
1581
		$out = $this->getContext()->getOutput();
1582
		if ( !$msg->isDisabled() ) {
1583
			$helpUrl = Skin::makeUrl( $msg->plain() );
1584
			$out->addHelpLink( $helpUrl, true );
1585
		} else {
1586
			$out->addHelpLink( $to, $overrideBaseUrl );
1587
		}
1588
	}
1589
1590
	/**
1591
	 * Handle action=render