mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Support - Differential - fix rendering feed story where you removed a repository
Summary: Fixes T6176. Language here is a bit awkard but I wanted to use the verb "removed" *and* still have the object first, so I ended up adding the before details parenthetically. Test Plan: story no longer fatal'd in my feed Reviewers: epriestley, chad Reviewed By: chad Subscribers: epriestley, Korvin Maniphest Tasks: T6176 Differential Revision: https://secure.phabricator.com/D10549
This commit is contained in:
parent
11f6b01428
commit
93e1978e05
1 changed files with 8 additions and 2 deletions
|
@ -107,19 +107,25 @@ final class DifferentialRepositoryField
|
|||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
if ($old) {
|
||||
if ($old && $new) {
|
||||
return pht(
|
||||
'%s updated the repository for %s from %s to %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid),
|
||||
$xaction->renderHandleLink($old),
|
||||
$xaction->renderHandleLink($new));
|
||||
} else {
|
||||
} else if ($new) {
|
||||
return pht(
|
||||
'%s set the repository for %s to %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid),
|
||||
$xaction->renderHandleLink($new));
|
||||
} else {
|
||||
return pht(
|
||||
'%s removed the repository for %s. (Repository was %s.)',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid),
|
||||
$xaction->renderHandleLink($old));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue