Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14029908
D14414.id34822.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D14414.id34822.diff
View Options
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,39 @@
$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 != $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 != $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.",
@@ -126,32 +148,43 @@
$new);
}
case self::TYPE_URL:
- if ($old === null) {
- return pht(
- '%s created %s.',
- $this->renderHandleLink($author_phid),
- $this->renderHandleLink($object_phid));
- } else {
- return pht(
- '%s changed the destination of %s from %s to %s',
- $this->renderHandleLink($author_phid),
- $this->renderHandleLink($object_phid),
- $old,
- $new);
+ if ($old != $new) {
+ if ($old === null) {
+ return pht(
+ '%s set the destination of %s to %s.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
+ $new);
+ } else {
+ return pht(
+ '%s changed the destination of %s from %s to %s.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
+ $old,
+ $new);
+ }
}
case self::TYPE_ALIAS:
- if ($old === null) {
- return pht(
- '%s created %s.',
- $this->renderHandleLink($author_phid),
- $this->renderHandleLink($object_phid));
- } else {
- return pht(
- '%s changed the alias of %s from %s to %s',
- $this->renderHandleLink($author_phid),
- $this->renderHandleLink($object_phid),
- $old,
- $new);
+ if ($old != $new) {
+ if ($old === null) {
+ return pht(
+ '%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.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
+ $old,
+ $new);
+ }
}
case self::TYPE_DESCRIPTION:
return pht(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 10:34 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6763521
Default Alt Text
D14414.id34822.diff (4 KB)
Attached To
Mode
D14414: Updating xaction titles for Phurl updates
Attached
Detach File
Event Timeline
Log In to Comment