X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinker.php;h=d3d1f389aff2da09762d858ddc4036d1e5351139;hb=2c74b043568eb00a33e3aea5cd1a6325444855e6;hp=eae49e7464fe0513a5c511627f606c227faf57e0;hpb=0387ce5cc68bac21c39744575b492fccb9eafb15;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index eae49e7464..d3d1f389af 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -319,7 +319,7 @@ class Linker { * @return LinkTarget */ public static function normaliseSpecialPage( LinkTarget $target ) { - if ( $target->getNamespace() == NS_SPECIAL ) { + if ( $target->getNamespace() == NS_SPECIAL && !$target->isExternal() ) { list( $name, $subpage ) = SpecialPageFactory::resolveAlias( $target->getDBkey() ); if ( !$name ) { return $target; @@ -1311,10 +1311,10 @@ class Linker { :? # ignore optional leading colon ([^\]|]+) # 1. link target; page names cannot include ] or | (?:\| - # 2. a pipe-separated substring; only the last is captured - # Stop matching at | and ]] without relying on backtracking. - ((?:]?[^\]|])*+) - )* + # 2. link text + # Stop matching at ]] without relying on backtracking. + ((?:]?[^\]])*+) + )? \]\] ([^[]*) # 3. link trail (the text up until the next link) /x', @@ -1988,6 +1988,8 @@ class Linker { } /** + * @deprecated since 1.28, use Language::formatSize() directly + * * Format a size in bytes for output, using an appropriate * unit (B, KB, MB or GB) according to the magnitude in question * @@ -1996,6 +1998,8 @@ class Linker { * @return string */ public static function formatSize( $size ) { + wfDeprecated( __METHOD__, '1.28' ); + global $wgLang; return htmlspecialchars( $wgLang->formatSize( $size ) ); }