Select the types of activity you want to include in your feed.
@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
···1414 }
15151616 public function getTitle() {
1717- return pht(
1818- '%s changed the title of this paste from %s to %s.',
1919- $this->renderAuthor(),
2020- $this->renderOldValue(),
2121- $this->renderNewValue());
1717+ $old = $this->getOldValue();
1818+ $new = $this->getNeWValue();
1919+2020+ if (strlen($old) && strlen($new)) {
2121+ return pht(
2222+ '%s changed the title of this paste from %s to %s.',
2323+ $this->renderAuthor(),
2424+ $this->renderOldValue(),
2525+ $this->renderNewValue());
2626+ } else if (strlen($new)) {
2727+ return pht(
2828+ '%s changed the title of this paste from untitled to %s.',
2929+ $this->renderAuthor(),
3030+ $this->renderNewValue());
3131+ } else {
3232+ return pht(
3333+ '%s changed the title of this paste from %s to untitled.',
3434+ $this->renderAuthor(),
3535+ $this->renderOldValue());
3636+ }
2237 }
23382439 public function getTitleForFeed() {
2525- return pht(
2626- '%s updated the title for %s from %s to %s.',
2727- $this->renderAuthor(),
2828- $this->renderObject(),
2929- $this->renderOldValue(),
3030- $this->renderNewValue());
4040+ $old = $this->getOldValue();
4141+ $new = $this->getNeWValue();
4242+4343+ if (strlen($old) && strlen($new)) {
4444+ return pht(
4545+ '%s updated the title for %s from %s to %s.',
4646+ $this->renderAuthor(),
4747+ $this->renderObject(),
4848+ $this->renderOldValue(),
4949+ $this->renderNewValue());
5050+ } else if (strlen($new)) {
5151+ return pht(
5252+ '%s updated the title for %s from untitled to %s.',
5353+ $this->renderAuthor(),
5454+ $this->renderObject(),
5555+ $this->renderNewValue());
5656+ } else {
5757+ return pht(
5858+ '%s updated the title for %s from %s to untitled.',
5959+ $this->renderAuthor(),
6060+ $this->renderObject(),
6161+ $this->renderOldValue());
6262+ }
3163 }
32643365}