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

Simplify Countdown mailtags

Summary: These were a little silly, simplify them

Test Plan: New countdown, edit preferences, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13888
This commit is contained in:
Chad Little 2015-08-17 10:08:52 -07:00
parent fd61702d6e
commit f5ea5ba9fe
2 changed files with 10 additions and 14 deletions

View file

@ -147,12 +147,10 @@ final class PhabricatorCountdownEditor
public function getMailTagsMap() {
return array(
PhabricatorCountdownTransaction::MAILTAG_TITLE =>
pht('Someone changes the countdown title.'),
PhabricatorCountdownTransaction::MAILTAG_DESCRIPTION =>
pht('Someone changes the countdown description.'),
PhabricatorCountdownTransaction::MAILTAG_EPOCH =>
pht('Someone changes the countdown end date.'),
PhabricatorCountdownTransaction::MAILTAG_DETAILS =>
pht('Someone changes the countdown details.'),
PhabricatorCountdownTransaction::MAILTAG_COMMENT =>
pht('Someone comments on a countdown.'),
PhabricatorCountdownTransaction::MAILTAG_OTHER =>
pht('Other countdown activity not listed above occurs.'),
);

View file

@ -7,9 +7,8 @@ final class PhabricatorCountdownTransaction
const TYPE_EPOCH = 'countdown:epoch';
const TYPE_DESCRIPTION = 'countdown:description';
const MAILTAG_TITLE = 'countdown:title';
const MAILTAG_EPOCH = 'countdown:epoch';
const MAILTAG_DESCRIPTION = 'countdown:description';
const MAILTAG_DETAILS = 'countdown:details';
const MAILTAG_COMMENT = 'countdown:comment';
const MAILTAG_OTHER = 'countdown:other';
public function getApplicationName() {
@ -135,14 +134,13 @@ final class PhabricatorCountdownTransaction
$tags = parent::getMailTags();
switch ($this->getTransactionType()) {
case PhabricatorTransactions::TYPE_COMMENT:
$tags[] = self::MAILTAG_COMMENT;
break;
case self::TYPE_TITLE:
$tags[] = self::MAILTAG_TITLE;
break;
case self::TYPE_EPOCH:
$tags[] = self::MAILTAG_EPOCH;
break;
case self::TYPE_DESCRIPTION:
$tags[] = self::MAILTAG_DESCRIPTION;
$tags[] = self::MAILTAG_DETAILS;
break;
default:
$tags[] = self::MAILTAG_OTHER;