1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

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
This commit is contained in:
epriestley 2013-08-20 10:04:33 -07:00
parent 8769759c15
commit f034fd80db
21 changed files with 11 additions and 82 deletions

View file

@ -34,10 +34,6 @@ final class PhabricatorAuthProviderConfigTransaction
return null;
}
public function getApplicationObjectTypeName() {
return pht('authentication provider');
}
public function getIcon() {
$old = $this->getOldValue();
$new = $this->getNewValue();

View file

@ -17,11 +17,6 @@ final class PhabricatorConfigTransaction
return null;
}
public function getApplicationObjectTypeName() {
return pht('config');
}
public function getTitle() {
$author_phid = $this->getAuthorPHID();

View file

@ -17,10 +17,6 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
return new ConpherenceTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('conpherence');
}
public function getNoEffectDescription() {
switch ($this->getTransactionType()) {
case ConpherenceTransactionType::TYPE_PARTICIPANTS:

View file

@ -14,8 +14,4 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
return new DifferentialTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('revision');
}
}

View file

@ -17,9 +17,5 @@ final class HeraldRuleTransaction
return new HeraldRuleTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('rule');
}
}

View file

@ -21,10 +21,6 @@ final class LegalpadTransaction extends PhabricatorApplicationTransaction {
return new LegalpadTransactionView();
}
public function getApplicationObjectTypeName() {
return pht('document');
}
public function shouldHide() {
$old = $this->getOldValue();

View file

@ -19,10 +19,6 @@ final class PhabricatorMacroTransaction
return new PhabricatorMacroTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('macro');
}
public function getRequiredHandlePHIDs() {
$phids = parent::getRequiredHandlePHIDs();

View file

@ -22,10 +22,6 @@ final class PhabricatorPasteTransaction
return new PhabricatorPasteTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('paste');
}
public function getRequiredHandlePHIDs() {
$phids = parent::getRequiredHandlePHIDs();

View file

@ -15,9 +15,5 @@ final class PhabricatorUserTransaction
return null;
}
public function getApplicationObjectTypeName() {
return pht('user');
}
}

View file

@ -17,10 +17,6 @@ final class PhluxTransaction extends PhabricatorApplicationTransaction {
return null;
}
public function getApplicationObjectTypeName() {
return pht('variable');
}
public function getTitle() {
$author_phid = $this->getAuthorPHID();

View file

@ -21,10 +21,6 @@ final class PholioTransaction extends PhabricatorApplicationTransaction {
return new PholioTransactionView();
}
public function getApplicationObjectTypeName() {
return pht('mock');
}
public function getRequiredHandlePHIDs() {
$phids = parent::getRequiredHandlePHIDs();
$phids[] = $this->getObjectPHID();

View file

@ -17,10 +17,6 @@ final class PhortuneAccountTransaction
return null;
}
public function getApplicationObjectTypeName() {
return pht('account');
}
public function getTitle() {
$author_phid = $this->getAuthorPHID();

View file

@ -19,10 +19,6 @@ final class PhortuneProductTransaction
return null;
}
public function getApplicationObjectTypeName() {
return pht('product');
}
public function getTitle() {
$author_phid = $this->getAuthorPHID();

View file

@ -21,10 +21,6 @@ final class PonderAnswerTransaction
return new PonderAnswerTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('answer');
}
public function getTitleForFeed() {
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();

View file

@ -24,10 +24,6 @@ final class PonderQuestionTransaction
return new PonderQuestionTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('question');
}
public function getTitle() {
$author_phid = $this->getAuthorPHID();

View file

@ -11,9 +11,5 @@ final class ReleephBranchTransaction
return ReleephPHIDTypeBranch::TYPECONST;
}
public function getApplicationObjectTypeName() {
return pht('branch');
}
}

View file

@ -11,9 +11,5 @@ final class ReleephProjectTransaction
return ReleephPHIDTypeProject::TYPECONST;
}
public function getApplicationObjectTypeName() {
return pht('project');
}
}

View file

@ -23,10 +23,6 @@ final class ReleephRequestTransaction
return new ReleephRequestTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('releeph request');
}
public function hasChangeDetails() {
switch ($this->getTransactionType()) {
default;

View file

@ -19,10 +19,6 @@ final class PhabricatorRepositoryTransaction
return null;
}
public function getApplicationObjectTypeName() {
return pht('repository');
}
public function getTitle() {
$author_phid = $this->getAuthorPHID();

View file

@ -20,10 +20,6 @@ final class PhabricatorSlowvoteTransaction
return new PhabricatorSlowvoteTransactionComment();
}
public function getApplicationObjectTypeName() {
return pht('vote');
}
public function shouldHide() {
$old = $this->getOldValue();
$new = $this->getNewValue();

View file

@ -30,7 +30,17 @@ abstract class PhabricatorApplicationTransaction
private $transactionGroup = array();
abstract public function getApplicationTransactionType();
abstract public function getApplicationObjectTypeName();
private function getApplicationObjectTypeName() {
$types = PhabricatorPHIDType::getAllTypes();
$type = idx($types, $this->getApplicationTransactionType());
if ($type) {
return $type->getTypeName();
}
return pht('Object');
}
public function getApplicationTransactionCommentObject() {
throw new Exception("Not implemented!");