Page MenuHomePhabricator

D14414.id34824.diff
No OneTemporary

D14414.id34824.diff

diff --git a/src/applications/phurl/storage/PhabricatorPhurlURLTransaction.php b/src/applications/phurl/storage/PhabricatorPhurlURLTransaction.php
--- a/src/applications/phurl/storage/PhabricatorPhurlURLTransaction.php
+++ b/src/applications/phurl/storage/PhabricatorPhurlURLTransaction.php
@@ -81,17 +81,35 @@
$new);
}
case self::TYPE_URL:
- return pht(
- '%s changed the destination of the URL from %s to %s.',
- $this->renderHandleLink($author_phid),
- $old,
- $new);
+ if ($old === null) {
+ return pht(
+ '%s set the destination of the URL to %s.',
+ $this->renderHandleLink($author_phid),
+ $new);
+ } else {
+ return pht(
+ '%s changed the destination of the URL from %s to %s.',
+ $this->renderHandleLink($author_phid),
+ $old,
+ $new);
+ }
case self::TYPE_ALIAS:
- return pht(
- '%s changed the alias of the URL from %s to %s.',
- $this->renderHandleLink($author_phid),
- $old,
- $new);
+ if ($old === null) {
+ return pht(
+ '%s set the alias of the URL to %s.',
+ $this->renderHandleLink($author_phid),
+ $new);
+ } else if ($new === null) {
+ return pht(
+ '%s removed the alias of the URL.',
+ $this->renderHandleLink($author_phid));
+ } else {
+ return pht(
+ '%s changed the alias of the URL from %s to %s.',
+ $this->renderHandleLink($author_phid),
+ $old,
+ $new);
+ }
case self::TYPE_DESCRIPTION:
return pht(
"%s updated the URL's description.",
@@ -128,12 +146,13 @@
case self::TYPE_URL:
if ($old === null) {
return pht(
- '%s created %s.',
+ '%s set the destination of %s to %s.',
$this->renderHandleLink($author_phid),
- $this->renderHandleLink($object_phid));
+ $this->renderHandleLink($object_phid),
+ $new);
} else {
return pht(
- '%s changed the destination of %s from %s to %s',
+ '%s changed the destination of %s from %s to %s.',
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid),
$old,
@@ -142,12 +161,18 @@
case self::TYPE_ALIAS:
if ($old === null) {
return pht(
- '%s created %s.',
+ '%s set the alias of %s to %s.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
+ $new);
+ } else if ($new === null) {
+ return pht(
+ '%s removed the alias of %s.',
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid));
} else {
return pht(
- '%s changed the alias of %s from %s to %s',
+ '%s changed the alias of %s from %s to %s.',
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid),
$old,

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 18, 3:28 AM (4 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7650101
Default Alt Text
D14414.id34824.diff (3 KB)

Event Timeline