mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 10:42:41 +01:00
Phriction - restore diff link
Summary: Fixes T6472. I was curious to see how many reports we'd get but we didn't get any I know of... Still, this is a nice convenient link. Test Plan: edited a wiki doc title + body. ran /bin/mail to see the body and liked what I saw ```TEXT BODY btrahan changed the title from "new title is a good thing" to "new title is a good thing asdsadsadsadsada". btrahan edited the document content. DOCUMENT DIFF http://phalanx.dev/phriction/diff/36/?l=3&r=4 DOCUMENT DETAIL http://phalanx.dev/w/``` Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6472 Differential Revision: https://secure.phabricator.com/D10850
This commit is contained in:
parent
310373ebc4
commit
b85283105e
1 changed files with 18 additions and 0 deletions
|
@ -405,6 +405,24 @@ final class PhrictionTransactionEditor
|
|||
$body->addTextSection(
|
||||
pht('DOCUMENT CONTENT'),
|
||||
$object->getContent()->getContent());
|
||||
} else {
|
||||
|
||||
foreach ($xactions as $xaction) {
|
||||
switch ($xaction->getTransactionType()) {
|
||||
case PhrictionTransaction::TYPE_CONTENT:
|
||||
$diff_uri = id(new PhutilURI(
|
||||
'/phriction/diff/'.$object->getID().'/'))
|
||||
->alter('l', $this->getOldContent()->getVersion())
|
||||
->alter('r', $this->getNewContent()->getVersion());
|
||||
$body->addLinkSection(
|
||||
pht('DOCUMENT DIFF'),
|
||||
PhabricatorEnv::getProductionURI($diff_uri));
|
||||
break 2;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$body->addLinkSection(
|
||||
|
|
Loading…
Reference in a new issue