@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Display link to change since last diff in Differential update e-mail

Test Plan: Updated revision, clicked on the link.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2731

vrana 3718e49f 06371bc2

+19 -3
+18 -2
src/applications/differential/field/specification/DifferentialRevisionIDFieldSpecification.php
··· 105 105 } 106 106 107 107 public function renderValueForMail($phase) { 108 - $uri = PhabricatorEnv::getProductionURI('/D'.$this->id); 109 - return "REVISION DETAIL\n {$uri}"; 108 + $body = array(); 109 + $body[] = 'REVISION DETAIL'; 110 + $body[] = ' '.PhabricatorEnv::getProductionURI('/D'.$this->id); 111 + 112 + if ($phase == DifferentialMailPhase::UPDATE) { 113 + $diffs = id(new DifferentialDiff())->loadAllWhere( 114 + 'revisionID = %d ORDER BY id DESC LIMIT 2', 115 + $this->id); 116 + if (count($diffs) == 2) { 117 + list($new, $old) = array_values(mpull($diffs, 'getID')); 118 + $body[] = null; 119 + $body[] = 'CHANGE SINCE LAST DIFF'; 120 + $body[] = ' '.PhabricatorEnv::getProductionURI( 121 + "/D{$this->id}?vs={$old}&id={$new}#differential-review-toc"); 122 + } 123 + } 124 + 125 + return implode("\n", $body); 110 126 } 111 127 112 128 }
+1 -1
src/applications/differential/mail/DifferentialMail.php
··· 266 266 267 267 268 268 protected function formatText($text) { 269 - $text = explode("\n", $text); 269 + $text = explode("\n", rtrim($text)); 270 270 foreach ($text as &$line) { 271 271 $line = rtrim(' '.$line); 272 272 }