1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

Convert two missed phutil_utf8_shorten() callsites

Summary: Fixes T6006. These didn't get caught by D10392.

Test Plan: Forced migration to re-run; ran SSH commands against Phabricator.

Auditors: btrahan
This commit is contained in:
epriestley 2014-08-30 07:19:47 -07:00
parent b93bc7e479
commit 6be8d65763
2 changed files with 12 additions and 4 deletions

View file

@ -67,9 +67,14 @@ foreach ($map as $credential_type => $credential_usernames) {
foreach ($credential_usernames as $username => $credential_secrets) {
foreach ($credential_secrets as $secret_plaintext => $repositories) {
$callsigns = mpull($repositories, 'getCallsign');
$signs = implode(', ', $callsigns);
$name = pht(
'Migrated Repository Credential (%s)',
phutil_utf8_shorten(implode(', ', $callsigns), 128));
id(new PhutilUTF8StringTruncator())
->setMaximumGlyphs(128)
->truncateString($signs));
echo "Creating: {$name}...\n";

View file

@ -82,12 +82,15 @@ try {
implode(', ', $workflow_names)));
}
$log_argv = implode(' ', array_slice($original_argv, 1));
$log_argv = id(new PhutilUTF8StringTruncator())
->setMaximumCodepoints(128)
->truncateString($log_argv);
$ssh_log->setData(
array(
'C' => $original_argv[0],
'U' => phutil_utf8_shorten(
implode(' ', array_slice($original_argv, 1)),
128),
'U' => $log_argv,
));
$command = head($original_argv);