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

Remove getApplicationObjectTypeName from ApplicationTransactions

Summary:
We can get this out of PHIDType reasonably in all cases and simplify implementation here.

None of these translate correctly anyway so they're basically debugging/development strings.

Test Plan: `grep`, browsed some transactions

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+11 -82
-4
src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php
··· 34 34 return null; 35 35 } 36 36 37 - public function getApplicationObjectTypeName() { 38 - return pht('authentication provider'); 39 - } 40 - 41 37 public function getIcon() { 42 38 $old = $this->getOldValue(); 43 39 $new = $this->getNewValue();
-5
src/applications/config/storage/PhabricatorConfigTransaction.php
··· 17 17 return null; 18 18 } 19 19 20 - public function getApplicationObjectTypeName() { 21 - return pht('config'); 22 - } 23 - 24 - 25 20 public function getTitle() { 26 21 $author_phid = $this->getAuthorPHID(); 27 22
-4
src/applications/conpherence/storage/ConpherenceTransaction.php
··· 17 17 return new ConpherenceTransactionComment(); 18 18 } 19 19 20 - public function getApplicationObjectTypeName() { 21 - return pht('conpherence'); 22 - } 23 - 24 20 public function getNoEffectDescription() { 25 21 switch ($this->getTransactionType()) { 26 22 case ConpherenceTransactionType::TYPE_PARTICIPANTS:
-4
src/applications/differential/storage/DifferentialTransaction.php
··· 14 14 return new DifferentialTransactionComment(); 15 15 } 16 16 17 - public function getApplicationObjectTypeName() { 18 - return pht('revision'); 19 - } 20 - 21 17 }
-4
src/applications/herald/storage/HeraldRuleTransaction.php
··· 17 17 return new HeraldRuleTransactionComment(); 18 18 } 19 19 20 - public function getApplicationObjectTypeName() { 21 - return pht('rule'); 22 - } 23 - 24 20 } 25 21
-4
src/applications/legalpad/storage/LegalpadTransaction.php
··· 21 21 return new LegalpadTransactionView(); 22 22 } 23 23 24 - public function getApplicationObjectTypeName() { 25 - return pht('document'); 26 - } 27 - 28 24 public function shouldHide() { 29 25 $old = $this->getOldValue(); 30 26
-4
src/applications/macro/storage/PhabricatorMacroTransaction.php
··· 19 19 return new PhabricatorMacroTransactionComment(); 20 20 } 21 21 22 - public function getApplicationObjectTypeName() { 23 - return pht('macro'); 24 - } 25 - 26 22 public function getRequiredHandlePHIDs() { 27 23 $phids = parent::getRequiredHandlePHIDs(); 28 24
-4
src/applications/paste/storage/PhabricatorPasteTransaction.php
··· 22 22 return new PhabricatorPasteTransactionComment(); 23 23 } 24 24 25 - public function getApplicationObjectTypeName() { 26 - return pht('paste'); 27 - } 28 - 29 25 public function getRequiredHandlePHIDs() { 30 26 $phids = parent::getRequiredHandlePHIDs(); 31 27
-4
src/applications/people/storage/PhabricatorUserTransaction.php
··· 15 15 return null; 16 16 } 17 17 18 - public function getApplicationObjectTypeName() { 19 - return pht('user'); 20 - } 21 - 22 18 } 23 19
-4
src/applications/phlux/storage/PhluxTransaction.php
··· 17 17 return null; 18 18 } 19 19 20 - public function getApplicationObjectTypeName() { 21 - return pht('variable'); 22 - } 23 - 24 20 public function getTitle() { 25 21 $author_phid = $this->getAuthorPHID(); 26 22
-4
src/applications/pholio/storage/PholioTransaction.php
··· 21 21 return new PholioTransactionView(); 22 22 } 23 23 24 - public function getApplicationObjectTypeName() { 25 - return pht('mock'); 26 - } 27 - 28 24 public function getRequiredHandlePHIDs() { 29 25 $phids = parent::getRequiredHandlePHIDs(); 30 26 $phids[] = $this->getObjectPHID();
-4
src/applications/phortune/storage/PhortuneAccountTransaction.php
··· 17 17 return null; 18 18 } 19 19 20 - public function getApplicationObjectTypeName() { 21 - return pht('account'); 22 - } 23 - 24 20 public function getTitle() { 25 21 $author_phid = $this->getAuthorPHID(); 26 22
-4
src/applications/phortune/storage/PhortuneProductTransaction.php
··· 19 19 return null; 20 20 } 21 21 22 - public function getApplicationObjectTypeName() { 23 - return pht('product'); 24 - } 25 - 26 22 public function getTitle() { 27 23 $author_phid = $this->getAuthorPHID(); 28 24
-4
src/applications/ponder/storage/PonderAnswerTransaction.php
··· 21 21 return new PonderAnswerTransactionComment(); 22 22 } 23 23 24 - public function getApplicationObjectTypeName() { 25 - return pht('answer'); 26 - } 27 - 28 24 public function getTitleForFeed() { 29 25 $author_phid = $this->getAuthorPHID(); 30 26 $object_phid = $this->getObjectPHID();
-4
src/applications/ponder/storage/PonderQuestionTransaction.php
··· 24 24 return new PonderQuestionTransactionComment(); 25 25 } 26 26 27 - public function getApplicationObjectTypeName() { 28 - return pht('question'); 29 - } 30 - 31 27 public function getTitle() { 32 28 $author_phid = $this->getAuthorPHID(); 33 29
-4
src/applications/releeph/storage/ReleephBranchTransaction.php
··· 11 11 return ReleephPHIDTypeBranch::TYPECONST; 12 12 } 13 13 14 - public function getApplicationObjectTypeName() { 15 - return pht('branch'); 16 - } 17 - 18 14 } 19 15
-4
src/applications/releeph/storage/ReleephProjectTransaction.php
··· 11 11 return ReleephPHIDTypeProject::TYPECONST; 12 12 } 13 13 14 - public function getApplicationObjectTypeName() { 15 - return pht('project'); 16 - } 17 - 18 14 } 19 15
-4
src/applications/releeph/storage/ReleephRequestTransaction.php
··· 23 23 return new ReleephRequestTransactionComment(); 24 24 } 25 25 26 - public function getApplicationObjectTypeName() { 27 - return pht('releeph request'); 28 - } 29 - 30 26 public function hasChangeDetails() { 31 27 switch ($this->getTransactionType()) { 32 28 default;
-4
src/applications/repository/storage/PhabricatorRepositoryTransaction.php
··· 19 19 return null; 20 20 } 21 21 22 - public function getApplicationObjectTypeName() { 23 - return pht('repository'); 24 - } 25 - 26 22 public function getTitle() { 27 23 $author_phid = $this->getAuthorPHID(); 28 24
-4
src/applications/slowvote/storage/PhabricatorSlowvoteTransaction.php
··· 20 20 return new PhabricatorSlowvoteTransactionComment(); 21 21 } 22 22 23 - public function getApplicationObjectTypeName() { 24 - return pht('vote'); 25 - } 26 - 27 23 public function shouldHide() { 28 24 $old = $this->getOldValue(); 29 25 $new = $this->getNewValue();
+11 -1
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 30 30 private $transactionGroup = array(); 31 31 32 32 abstract public function getApplicationTransactionType(); 33 - abstract public function getApplicationObjectTypeName(); 33 + 34 + private function getApplicationObjectTypeName() { 35 + $types = PhabricatorPHIDType::getAllTypes(); 36 + 37 + $type = idx($types, $this->getApplicationTransactionType()); 38 + if ($type) { 39 + return $type->getTypeName(); 40 + } 41 + 42 + return pht('Object'); 43 + } 34 44 35 45 public function getApplicationTransactionCommentObject() { 36 46 throw new Exception("Not implemented!");