mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Improve rendering behavior for "foist upon" with an empty tokenizer
Summary: Ref T13628. If you "Foist Upon", then delete the value in the tokenizer, then scroll down to the preview, you currently get an ugly "Unknown Object (???)" rendering. This is technically correct in some vague sense and the transaction won't apply, but provide a more aesthetic rendering instead. Test Plan: {F8487050} Maniphest Tasks: T13628 Differential Revision: https://secure.phabricator.com/D21592
This commit is contained in:
parent
dec1413684
commit
f3caf7e9fc
1 changed files with 14 additions and 4 deletions
|
@ -95,10 +95,20 @@ final class DifferentialRevisionAuthorTransaction
|
|||
}
|
||||
|
||||
if ($is_foist) {
|
||||
return pht(
|
||||
'%s foisted this revision upon %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderNewHandle());
|
||||
if ($new_phid) {
|
||||
return pht(
|
||||
'%s foisted this revision upon %s.',
|
||||
$this->renderAuthor(),
|
||||
$this->renderNewHandle());
|
||||
} else {
|
||||
|
||||
// This isn't a valid transaction that can be applied, but happens in
|
||||
// the preview if you temporarily delete the tokenizer value.
|
||||
|
||||
return pht(
|
||||
'%s foisted this revision upon...',
|
||||
$this->renderAuthor());
|
||||
}
|
||||
}
|
||||
|
||||
return pht(
|
||||
|
|
Loading…
Reference in a new issue