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

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