(bug 31535; bug 332) Properly truncate upload summaries (img_description) on the...
authorBrian Wolff <bawolff@users.mediawiki.org>
Wed, 16 Nov 2011 19:50:59 +0000 (19:50 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Wed, 16 Nov 2011 19:50:59 +0000 (19:50 +0000)
commit41f1b6a2880aa984c88045ebaeaddc147b9b9a35
tree2b8a153a929d89636948981002b5bed8608ecf4f
parentc89ae5af0060aeb5d88939de1031520157bc3df9
(bug 31535; bug 332) Properly truncate upload summaries (img_description) on the php side.

Before it would get truncated when inserted into the 255 byte db field. This is bad as it can leave dangling multi-byte unicode sequences, additionally, since directly after upload we appearently cache the file object, this can result in the comment in the file history table being super-huge.

This also removes the parenthesis in the comment field in the table. Its a table, we don't need to use () to visually separate it from the rest of the page content.

This commit also causes '...' (or the i18n'ed equivalent) to be appended when truncated a comment. Previously that didn't happen. Also I changed it to use a method that doesn't check for '*' as a special value to mean no description. I looked at the toolserver db, and even uploads to enwikipedia from 2002 don't use '*' as special no-description marker.
RELEASE-NOTES-1.19
includes/ImagePage.php
includes/filerepo/LocalFile.php