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

at recaptime-dev/main 45 lines 996 B view raw
1<?php 2 3final class PhabricatorFileDeleteTransaction 4 extends PhabricatorFileTransactionType { 5 6 const TRANSACTIONTYPE = 'file:delete'; 7 8 public function generateOldValue($object) { 9 return PhabricatorFile::STATUS_ACTIVE; 10 } 11 12 public function applyInternalEffects($object, $value) { 13 $file = $object; 14 // Mark the file for deletion, save it, and schedule a worker to 15 // sweep by later and pick it up. 16 $file->setIsDeleted(true); 17 18 PhabricatorWorker::scheduleTask( 19 'FileDeletionWorker', 20 array('objectPHID' => $file->getPHID()), 21 array('priority' => PhabricatorWorker::PRIORITY_BULK)); 22 } 23 24 public function getIcon() { 25 return 'fa-ban'; 26 } 27 28 public function getColor() { 29 return 'red'; 30 } 31 32 public function getTitle() { 33 return pht( 34 '%s deleted this file.', 35 $this->renderAuthor()); 36 } 37 38 public function getTitleForFeed() { 39 return pht( 40 '%s deleted %s.', 41 $this->renderAuthor(), 42 $this->renderObject()); 43 } 44 45}