@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.

Updating xaction titles for Phurl updates

Summary: Ref T8992, Cleaning up and clarifying xaction titles for Phurl creation/updating.

Test Plan: Create a Phurl, update information, make sure xaction in the timeline makes sense.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8992

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

+40 -15
+40 -15
src/applications/phurl/storage/PhabricatorPhurlURLTransaction.php
··· 81 81 $new); 82 82 } 83 83 case self::TYPE_URL: 84 - return pht( 85 - '%s changed the destination of the URL from %s to %s.', 86 - $this->renderHandleLink($author_phid), 87 - $old, 88 - $new); 84 + if ($old === null) { 85 + return pht( 86 + '%s set the destination of the URL to %s.', 87 + $this->renderHandleLink($author_phid), 88 + $new); 89 + } else { 90 + return pht( 91 + '%s changed the destination of the URL from %s to %s.', 92 + $this->renderHandleLink($author_phid), 93 + $old, 94 + $new); 95 + } 89 96 case self::TYPE_ALIAS: 90 - return pht( 91 - '%s changed the alias of the URL from %s to %s.', 92 - $this->renderHandleLink($author_phid), 93 - $old, 94 - $new); 97 + if ($old === null) { 98 + return pht( 99 + '%s set the alias of the URL to %s.', 100 + $this->renderHandleLink($author_phid), 101 + $new); 102 + } else if ($new === null) { 103 + return pht( 104 + '%s removed the alias of the URL.', 105 + $this->renderHandleLink($author_phid)); 106 + } else { 107 + return pht( 108 + '%s changed the alias of the URL from %s to %s.', 109 + $this->renderHandleLink($author_phid), 110 + $old, 111 + $new); 112 + } 95 113 case self::TYPE_DESCRIPTION: 96 114 return pht( 97 115 "%s updated the URL's description.", ··· 128 146 case self::TYPE_URL: 129 147 if ($old === null) { 130 148 return pht( 131 - '%s created %s.', 149 + '%s set the destination of %s to %s.', 132 150 $this->renderHandleLink($author_phid), 133 - $this->renderHandleLink($object_phid)); 151 + $this->renderHandleLink($object_phid), 152 + $new); 134 153 } else { 135 154 return pht( 136 - '%s changed the destination of %s from %s to %s', 155 + '%s changed the destination of %s from %s to %s.', 137 156 $this->renderHandleLink($author_phid), 138 157 $this->renderHandleLink($object_phid), 139 158 $old, ··· 142 161 case self::TYPE_ALIAS: 143 162 if ($old === null) { 144 163 return pht( 145 - '%s created %s.', 164 + '%s set the alias of %s to %s.', 165 + $this->renderHandleLink($author_phid), 166 + $this->renderHandleLink($object_phid), 167 + $new); 168 + } else if ($new === null) { 169 + return pht( 170 + '%s removed the alias of %s.', 146 171 $this->renderHandleLink($author_phid), 147 172 $this->renderHandleLink($object_phid)); 148 173 } else { 149 174 return pht( 150 - '%s changed the alias of %s from %s to %s', 175 + '%s changed the alias of %s from %s to %s.', 151 176 $this->renderHandleLink($author_phid), 152 177 $this->renderHandleLink($object_phid), 153 178 $old,