1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 08:50:58 +01:00
phorge-phorge/src/applications
Bob Trahan 384b670709 Fix string truncation calls all over the codebase.
Summary: Fixes T6608, though I'll also clean up the comment for PhutilStringTruncator in another diff. If I understand correctly, before T1191, MySQL column length was by character count and post T1191 its by byte count. Ergo, most of these changes are going from codepoint -> bytes. See test plan for complete list of what was and was not done.

Test Plan:
Thought very carefully about each callsite and made changes as appropos. "Display" means the string is clearly used for display-only purposes and correctly uses "glyph" already.

grep -rn PhutilUTF8StringTruncator *

applications/calendar/query/PhabricatorCalendarEventSearchEngine.php:217:        ->addAttribute(id(new PhutilUTF8StringTruncator())  -- display
applications/chatlog/controller/PhabricatorChatLogChannelLogController.php:111:      $author = id(new PhutilUTF8StringTruncator())  -- display
applications/conduit/method/ConduitConnectConduitAPIMethod.php:62:    $client_description = id(new PhutilUTF8StringTruncator()) -- was codepoint, changed to bytes
applications/conpherence/view/ConpherenceFileWidgetView.php:22:        ->setFileName(id(new PhutilUTF8StringTruncator()) -- display
applications/differential/controller/DifferentialDiffViewController.php:65:            id(new PhutilUTF8StringTruncator()) -- display
applications/differential/event/DifferentialHovercardEventListener.php:69:        id(new PhutilUTF8StringTruncator()) -- display
applications/differential/parser/DifferentialCommitMessageParser.php:144:      $short = id(new PhutilUTF8StringTruncator()) -- was glyphs, made to bytes
applications/differential/view/DifferentialLocalCommitsView.php:80:      $summary = id(new PhutilUTF8StringTruncator()) -- display
applications/diffusion/controller/DiffusionBrowseFileController.php:686:            id(new PhutilUTF8StringTruncator()) -- display
applications/feed/story/PhabricatorFeedStory.php:392:      $text = id(new PhutilUTF8StringTruncator()) -- display, unless people are saving the results of renderSummary() somewhere...
applications/harbormaster/storage/build/HarbormasterBuild.php:216:    $log_source = id(new PhutilUTF8StringTruncator()) -- was codepoints now bytes
applications/herald/storage/transcript/HeraldObjectTranscript.php:55:        // NOTE: PhutilUTF8StringTruncator has huge runtime for giant strings. -- not applicable
applications/maniphest/export/ManiphestExcelDefaultFormat.php:107:        id(new PhutilUTF8StringTruncator()) -- bytes
applications/metamta/storage/PhabricatorMetaMTAMail.php:587:        $body = id(new PhutilUTF8StringTruncator()) -- bytes
applications/people/event/PhabricatorPeopleHovercardEventListener.php:62:        id(new PhutilUTF8StringTruncator()) -- display
applications/phame/conduit/PhameCreatePostConduitAPIMethod.php:93:      id(new PhutilUTF8StringTruncator()) -- was codepoints, now bytes
applications/pholio/storage/PholioTransaction.php:300:        id(new PhutilUTF8StringTruncator()) -- display
applications/phortune/provider/PhortuneBalancedPaymentProvider.php:147:    $charge_as = id(new PhutilUTF8StringTruncator()) -- bytes
applications/ponder/storage/PonderAnswerTransaction.php:86:          id(new PhutilUTF8StringTruncator()) -- display
applications/ponder/storage/PonderQuestionTransaction.php:267:            id(new PhutilUTF8StringTruncator()) -- display
applications/ponder/storage/PonderQuestionTransaction.php:276:            id(new PhutilUTF8StringTruncator()) -- display
applications/repository/storage/PhabricatorRepositoryCommitData.php:43:    $summary = id(new PhutilUTF8StringTruncator()) -- was codepoints, now bytes
applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:20:    $data->setAuthorName(id(new PhutilUTF8StringTruncator()) -- was codepoints, now bytes
applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php:158:        $item->addAttribute(id(new PhutilUTF8StringTruncator()) -- display
infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php:317:    $host = id(new PhutilUTF8StringTruncator()) -- bytes
view/form/control/AphrontFormPolicyControl.php:61:      $policy_short_name = id(new PhutilUTF8StringTruncator()) -- glyphs, probably display only

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6608

Differential Revision: https://secure.phabricator.com/D11219
2015-01-05 11:14:54 -08:00
..
almanac Add bin/almanac register to associate a host with an Almanac device and trust it 2015-01-02 15:13:30 -08:00
aphlict/management Try nodejs before node when starting notification server 2014-06-07 13:56:23 -07:00
arcanist/conduit Rename Conduit classes 2014-07-25 10:54:15 +10:00
audit Modernize remaining edge types 2015-01-03 10:58:20 +11:00
auth Fix a duplicate case statement 2015-01-05 08:24:16 +11:00
base Make the PhabricatorApplication::getName() method abstract 2015-01-02 10:03:31 +11:00
cache Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00
calendar Decouple some aspects of request routing and construction 2014-10-17 05:01:40 -07:00
celerity Attempt to workaround non-deterministic sort behavior 2015-01-05 08:23:47 +11:00
chatlog Remove an unused class 2015-01-03 12:23:18 +11:00
conduit Fix string truncation calls all over the codebase. 2015-01-05 11:14:54 -08:00
config Add cluster.addresses and require membership before accepting cluster authentication tokens 2015-01-02 15:13:41 -08:00
conpherence Modernize remaining edge types 2015-01-03 10:58:20 +11:00
console Move DarkConsole to an application 2014-10-13 11:17:09 -07:00
countdown Decouple some aspects of request routing and construction 2014-10-17 05:01:40 -07:00
daemon Allow archived tasks to be queried by object PHID and order by id 2014-12-30 15:54:56 -08:00
dashboard Rename PhabricatorDashboardPanelType subclasses for consistency 2015-01-05 06:32:08 +11:00
differential Fix string truncation calls all over the codebase. 2015-01-05 11:14:54 -08:00
diffusion Write edges for commit reverts 2015-01-05 07:09:02 +11:00
diviner Use new FutureIterator instead of Futures 2014-12-30 23:13:38 +11:00
doorkeeper Modernize remaining edge types 2015-01-03 10:58:20 +11:00
draft/storage Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00
drydock Transactions - adding willRenderTimeline to handle tricky cases 2014-12-04 13:58:52 -08:00
fact Minor formatting changes 2014-10-08 08:39:49 +11:00
feed Remove an unused class 2015-01-03 09:07:35 +11:00
files Modernize remaining edge types 2015-01-03 10:58:20 +11:00
flag Home - limit "status" queries to 100 and show 99+ if we hit that 2014-12-12 12:02:25 -08:00
fund remove unused FeedStory object in getTitleForFeed functions 2015-01-02 08:45:43 -08:00
harbormaster Fix string truncation calls all over the codebase. 2015-01-05 11:14:54 -08:00
help Update Phabricator header to use FontAwesome 2014-12-04 13:01:23 -08:00
herald Remove an unused class 2015-01-03 09:09:31 +11:00
home Maniphest - introduce needProjectPHIDs 2014-12-18 13:53:45 -08:00
legalpad Modernize remaining edge types 2015-01-03 10:58:20 +11:00
lipsum Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
macro remove unused FeedStory object in getTitleForFeed functions 2015-01-02 08:45:43 -08:00
mailinglists Decouple some aspects of request routing and construction 2014-10-17 05:01:40 -07:00
maniphest Remove unused ManiphestTaskDescriptionPreviewController class 2015-01-03 23:49:58 +11:00
meta Have app tooltips align east with more width 2014-12-18 14:03:13 -08:00
metamta Daemons - add "objectPHID" to task tables. 2014-12-23 16:30:05 -08:00
notification Rename PhabricatorSetupCheck subclasses for consistency 2015-01-02 15:27:58 +11:00
nuance Remove an unused class 2015-01-02 11:23:58 +11:00
oauthserver Decouple some aspects of request routing and construction 2014-10-17 05:01:40 -07:00
owners Migrate Project edges to subclass PhabricatorEdgeType 2015-01-02 10:10:59 +11:00
passphrase Modernize remaining edge types 2015-01-03 10:58:20 +11:00
paste remove unused FeedStory object in getTitleForFeed functions 2015-01-02 08:45:43 -08:00
people Add cluster.addresses and require membership before accepting cluster authentication tokens 2015-01-02 15:13:41 -08:00
phame Fix string truncation calls all over the codebase. 2015-01-05 11:14:54 -08:00
phid Don't skip policy checks on ObjectQuery if special capabilities are required 2014-12-17 17:04:12 -08:00
phlux Transactions - adding willRenderTimeline to handle tricky cases 2014-12-04 13:58:52 -08:00
pholio Fix some linter violations 2015-01-03 09:11:41 +11:00
phortune Remove unused Phortune exceptions 2015-01-03 23:50:32 +11:00
phpast Minor formatting changes 2014-10-08 08:39:49 +11:00
phragment Minor formatting changes 2014-10-08 08:39:49 +11:00
phrequent Home - limit "status" queries to 100 and show 99+ if we hit that 2014-12-12 12:02:25 -08:00
phriction Remove unused PhrictionDocumentPreviewController class 2015-01-03 23:50:19 +11:00
policy Rename PhabricatorPolicyRule subclasses for consistency 2015-01-03 23:48:55 +11:00
ponder remove unused FeedStory object in getTitleForFeed functions 2015-01-02 08:45:43 -08:00
project Clarify Tasks listed on Project Profiles 2015-01-04 09:03:04 -08:00
releeph Fix some linter violations 2015-01-03 09:11:41 +11:00
remarkup/conduit Rename Conduit classes 2014-07-25 10:54:15 +10:00
repository Fix string truncation calls all over the codebase. 2015-01-05 11:14:54 -08:00
search Modernize Pholio edges 2015-01-02 10:11:41 +11:00
settings Rename PhabricatorSettingsPanel subclasses for consistency 2015-01-02 15:20:08 +11:00
slowvote Transactions - adding willRenderTimeline to handle tricky cases 2014-12-04 13:58:52 -08:00
subscriptions Modernize remaining edge types 2015-01-03 10:58:20 +11:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00
tokens Minor formatting changes 2014-10-08 08:39:49 +11:00
transactions Modernize remaining edge types 2015-01-03 10:58:20 +11:00
typeahead Projects - tokenize projects more aggressively with respect to '-' 2014-08-14 12:28:11 -07:00
uiexample Fix a file name to match the PHP class name 2015-01-05 06:38:59 +11:00
xhprof Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00