| @@ 1598-1610 (lines=13) @@ | ||
| 1595 | * @param bool $overrideBaseUrl Whether $url is a full URL, to avoid MW.o. |
|
| 1596 | * @since 1.25 |
|
| 1597 | */ |
|
| 1598 | public function addHelpLink( $to, $overrideBaseUrl = false ) { |
|
| 1599 | $msg = wfMessage( |
|
| 1600 | 'namespace-' . $this->getTitle()->getNamespace() . '-helppage' |
|
| 1601 | ); |
|
| 1602 | ||
| 1603 | $out = $this->getContext()->getOutput(); |
|
| 1604 | if ( !$msg->isDisabled() ) { |
|
| 1605 | $helpUrl = Skin::makeUrl( $msg->plain() ); |
|
| 1606 | $out->addHelpLink( $helpUrl, true ); |
|
| 1607 | } else { |
|
| 1608 | $out->addHelpLink( $to, $overrideBaseUrl ); |
|
| 1609 | } |
|
| 1610 | } |
|
| 1611 | ||
| 1612 | /** |
|
| 1613 | * Handle action=render |
|
| @@ 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 |
|
| @@ 763-773 (lines=11) @@ | ||
| 760 | * @param bool $overrideBaseUrl Whether $url is a full URL, to avoid MW.o. |
|
| 761 | * @since 1.25 |
|
| 762 | */ |
|
| 763 | public function addHelpLink( $to, $overrideBaseUrl = false ) { |
|
| 764 | global $wgContLang; |
|
| 765 | $msg = $this->msg( $wgContLang->lc( $this->getName() ) . '-helppage' ); |
|
| 766 | ||
| 767 | if ( !$msg->isDisabled() ) { |
|
| 768 | $helpUrl = Skin::makeUrl( $msg->plain() ); |
|
| 769 | $this->getOutput()->addHelpLink( $helpUrl, true ); |
|
| 770 | } else { |
|
| 771 | $this->getOutput()->addHelpLink( $to, $overrideBaseUrl ); |
|
| 772 | } |
|
| 773 | } |
|
| 774 | ||
| 775 | /** |
|
| 776 | * Get the group that the special page belongs in on Special:SpecialPage |
|