From: C. Scott Ananian Date: Wed, 17 Oct 2018 02:34:25 +0000 (-0400) Subject: Remove Language::truncate(), deprecated in MW 1.31 X-Git-Tag: 1.34.0-rc.0~3700^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=a1b894cc42390a04de44899619d933d362170ac7 Remove Language::truncate(), deprecated in MW 1.31 Bug: T197492 Change-Id: I7a3f7a33270402f4b16b286f5d6ed65fee920fcc --- diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 59443dfda4..d254e71156 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -52,6 +52,7 @@ because of Phabricator reports. * Skin::doEditSectionLink requires type Language for the parameter $lang. The parameters $tooltip and $lang are mandatory. Omitting the parameters is deprecated since 1.32. +* Language::truncate(), deprecated in 1.31, has been removed. * … === Deprecations in 1.33 === diff --git a/languages/Language.php b/languages/Language.php index fb78f13fc5..e75ea1a194 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -3538,28 +3538,6 @@ class Language { ); } - /** - * This method is deprecated since 1.31 and kept as alias for truncateForDatabase, which - * has replaced it. This method provides truncation suitable for DB. - * - * The database offers limited byte lengths for some columns in the database; - * multi-byte character sets mean we need to ensure that only whole characters - * are included, otherwise broken characters can be passed to the user. - * - * @deprecated since 1.31, use truncateForDatabase or truncateForVisual as appropriate. - * - * @param string $string String to truncate - * @param int $length Maximum length (including ellipsis) - * @param string $ellipsis String to append to the truncated text - * @param bool $adjustLength Subtract length of ellipsis from $length. - * $adjustLength was introduced in 1.18, before that behaved as if false. - * @return string - */ - function truncate( $string, $length, $ellipsis = '...', $adjustLength = true ) { - wfDeprecated( __METHOD__, '1.31' ); - return $this->truncateForDatabase( $string, $length, $ellipsis, $adjustLength ); - } - /** * Truncate a string to a specified length in bytes, appending an optional * string (e.g. for ellipsis)