diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/actions/Action.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/actions/Action.php')
-rw-r--r-- | includes/actions/Action.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/includes/actions/Action.php b/includes/actions/Action.php index 8d11d901..bb6a4d5d 100644 --- a/includes/actions/Action.php +++ b/includes/actions/Action.php @@ -132,6 +132,8 @@ abstract class Action { if ( $actionName === 'historysubmit' ) { if ( $request->getBool( 'revisiondelete' ) ) { $actionName = 'revisiondelete'; + } elseif ( $request->getBool( 'editchangetags' ) ) { + $actionName = 'editchangetags'; } else { $actionName = 'view'; } @@ -375,6 +377,28 @@ abstract class Action { } /** + * Adds help link with an icon via page indicators. + * Link target can be overridden by a local message containing a wikilink: + * the message key is: lowercase action name + '-helppage'. + * @param string $to Target MediaWiki.org page title or encoded URL. + * @param bool $overrideBaseUrl Whether $url is a full URL, to avoid MW.o. + * @since 1.25 + */ + public function addHelpLink( $to, $overrideBaseUrl = false ) { + global $wgContLang; + $msg = wfMessage( $wgContLang->lc( + Action::getActionName( $this->getContext() ) + ) . '-helppage' ); + + if ( !$msg->isDisabled() ) { + $helpUrl = Skin::makeUrl( $msg->plain() ); + $this->getOutput()->addHelpLink( $helpUrl, true ); + } else { + $this->getOutput()->addHelpLink( $to, $overrideBaseUrl ); + } + } + + /** * The main action entry point. Do all output for display and send it to the context * output. Do not use globals $wgOut, $wgRequest, etc, in implementations; use * $this->getOutput(), etc. |