1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Fix Maniphest and Config transaction diff rendering

Summary:
I missed this in review of D5155: `wordwrap()` returns a string, but `phutil_utf8_hard_wrap()` returns an array.

Implode the returned arrays so the stuff underneath it doesn't choke.

Test Plan: Clicked "show details" on a maniphest task description change

Reviewers: AnhNhan, kwadwon

Reviewed By: kwadwon

CC: aran

Differential Revision: https://secure.phabricator.com/D5195
This commit is contained in:
epriestley 2013-03-03 11:37:45 -08:00
parent 555c0421bb
commit dc8cc123da
3 changed files with 6 additions and 1 deletions

View file

@ -571,7 +571,9 @@ final class ManiphestTransactionDetailView extends ManiphestView {
$id = $transaction->getID();
$old_text = phutil_utf8_hard_wrap($transaction->getOldValue(), 80);
$old_text = implode("\n", $old_text);
$new_text = phutil_utf8_hard_wrap($transaction->getNewValue(), 80);
$new_text = implode("\n", $new_text);
$engine = new PhabricatorDifferenceEngine();
$changeset = $engine->generateChangesetFromFileContent($old_text,

View file

@ -49,8 +49,9 @@ final class PhrictionDiffController
$text_r = $content_r->getContent();
$text_l = phutil_utf8_hard_wrap($text_l, 80);
$text_l = implode("\n", $text_l);
$text_r = phutil_utf8_hard_wrap($text_r, 80);
$text_r = implode("\n", $text_r);
$engine = new PhabricatorDifferenceEngine();
$changeset = $engine->generateChangesetFromFileContent($text_l, $text_r);

View file

@ -24,7 +24,9 @@ final class PhabricatorApplicationTransactionTextDiffDetailView
// that is built.
$old = phutil_utf8_hard_wrap($old, 80);
$old = implode("\n", $old);
$new = phutil_utf8_hard_wrap($new, 80);
$new = implode("\n", $new);
$engine = new PhabricatorDifferenceEngine();
$changeset = $engine->generateChangesetFromFileContent($old, $new);