diff options
author | Lucas Werkmeister <lucas.werkmeister@wikimedia.de> | 2020-10-16 18:48:49 +0200 |
---|---|---|
committer | Lucas Werkmeister <lucas.werkmeister@wikimedia.de> | 2022-07-22 17:26:07 +0200 |
commit | fb022a3c5d67a60c009598c3dbbb828dc20c306f (patch) | |
tree | 2f2601368890ba25f0ade9fa1c7acafafdd17d5c /includes/content/Content.php | |
parent | 6986603bdc5884f87708f80bda10a038f471b399 (diff) | |
download | mediawikicore-fb022a3c5d67a60c009598c3dbbb828dc20c306f.tar.gz mediawikicore-fb022a3c5d67a60c009598c3dbbb828dc20c306f.zip |
Clarify Content::getTextForSummary() $maxLength
The length should be in bytes, not characters: this seems clear from the
fact that the method is implemented using truncateForDatabase() or
substr(), not truncateForVisual() or mb_substr(), and that it is called
with max lengths based on a constant maximum length minus the strlen(),
not mb_strlen(), of other parts (see ContentHandler::getAutosummary()).
Change-Id: I57efa9a29742b3e5497b9d38cd90a6c6a5e7b582
Diffstat (limited to 'includes/content/Content.php')
-rw-r--r-- | includes/content/Content.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/content/Content.php b/includes/content/Content.php index 8d90d605073e..abe5d14e517f 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -66,7 +66,8 @@ interface Content { * * @since 1.21 * - * @param int $maxLength Maximum length of the summary text. + * @param int $maxLength Maximum length of the summary text, in bytes. + * Usually implemented using {@link Language::truncateForDatabase()}. * * @return string The summary text. */ |