X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguage.php;h=2038baca98c2122dce52c9e4fbcb46a9ebc3111c;hb=09519accc36cddcb364ef467cea22e10b62a7c1b;hp=527f3827281138e01fd32f01ef41ab324c0c3c3a;hpb=7d236e0f1af81fce9808266d27b04a59fead4b02;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index 527f382728..2038baca98 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -63,6 +63,7 @@ class FakeConverter { function markNoConversion( $text, $noParse = false ) { return $text; } function convertCategoryKey( $key ) { return $key; } function convertLinkToAllVariants( $text ) { return $this->autoConvertToAllVariants( $text ); } + /** @deprecated since 1.22 is no longer used */ function armourMath( $text ) { return $text; } function validateVariant( $variant = null ) { return $variant === $this->mLang->getCode() ? $variant : null; } function translate( $text, $variant ) { return $text; } @@ -3324,11 +3325,13 @@ class Language { $length -= $eLength; $string = substr( $string, 0, $length ); // xyz... $string = $this->removeBadCharLast( $string ); + $string = rtrim( $string ); $string = $string . $ellipsis; } else { $length += $eLength; $string = substr( $string, $length ); // ...xyz $string = $this->removeBadCharFirst( $string ); + $string = ltrim( $string ); $string = $ellipsis . $string; } } @@ -3811,6 +3814,7 @@ class Language { * * @param $text string * @return string + * @deprecated since 1.22 is no longer used */ public function armourMath( $text ) { return $this->mConverter->armourMath( $text ); @@ -3949,6 +3953,16 @@ class Language { return self::$dataCache->getItem( $this->mCode, 'linkTrail' ); } + /** + * A regular expression character set to match legal word-prefixing + * characters which should be merged onto a link of the form foo[[bar]]. + * + * @return string + */ + public function linkPrefixCharset() { + return self::$dataCache->getItem( $this->mCode, 'linkPrefixCharset' ); + } + /** * @return Language */ @@ -4468,7 +4482,7 @@ class Language { $nlink = htmlspecialchars( $next ); } else { $nlink = $this->numLink( $title, $offset + $limit, $limit, - $query, $next, 'prevn-title', 'mw-nextlink' ); + $query, $next, 'nextn-title', 'mw-nextlink' ); } # Make links to set number of items per page