diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /includes/parser/CoreLinkFunctions.php | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'includes/parser/CoreLinkFunctions.php')
-rw-r--r-- | includes/parser/CoreLinkFunctions.php | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/includes/parser/CoreLinkFunctions.php b/includes/parser/CoreLinkFunctions.php index 913ec22b..8de13278 100644 --- a/includes/parser/CoreLinkFunctions.php +++ b/includes/parser/CoreLinkFunctions.php @@ -10,11 +10,25 @@ * @ingroup Parser */ class CoreLinkFunctions { + /** + * @param $parser Parser_LinkHooks + * @return bool + */ static function register( $parser ) { $parser->setLinkHook( NS_CATEGORY, array( __CLASS__, 'categoryLinkHook' ) ); return true; } + /** + * @param $parser Parser + * @param $holders LinkHolderArray + * @param $markers LinkMarkerReplacer + * @param Title $title + * @param $titleText + * @param null $displayText + * @param bool $leadingColon + * @return bool + */ static function defaultLinkHook( $parser, $holders, $markers, Title $title, $titleText, &$displayText = null, &$leadingColon = false ) { if( isset($displayText) && $markers->findMarker( $displayText ) ) { @@ -25,9 +39,19 @@ class CoreLinkFunctions { # Return false so that this link is reverted back to WikiText return false; } - return $holders->makeHolder( $title, isset($displayText) ? $displayText : $titleText, '', '', '' ); + return $holders->makeHolder( $title, isset($displayText) ? $displayText : $titleText, array(), '', '' ); } - + + /** + * @param $parser Parser + * @param $holders LinkHolderArray + * @param $markers LinkMarkerReplacer + * @param Title $title + * @param $titleText + * @param null $sortText + * @param bool $leadingColon + * @return bool|string + */ static function categoryLinkHook( $parser, $holders, $markers, Title $title, $titleText, &$sortText = null, &$leadingColon = false ) { global $wgContLang; @@ -48,5 +72,5 @@ class CoreLinkFunctions { $parser->mOutput->addCategory( $title->getDBkey(), $sortText ); return ''; } - + } |