1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00

Clean up some PhamePostEditor archive cases

Summary: Forgot to save this file locally. Adds isArchived to same hidden features as isDraft

Test Plan: test mail on archived posts

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16106
This commit is contained in:
Chad Little 2016-06-13 10:52:14 -07:00
parent 72c57d36a3
commit e78488f6eb

View file

@ -171,7 +171,7 @@ final class PhamePostEditor
protected function shouldSendMail(
PhabricatorLiskDAO $object,
array $xactions) {
if ($object->isDraft()) {
if ($object->isDraft() || ($object->isArchived())) {
return false;
}
return true;
@ -180,7 +180,7 @@ final class PhamePostEditor
protected function shouldPublishFeedStory(
PhabricatorLiskDAO $object,
array $xactions) {
if ($object->isDraft()) {
if ($object->isDraft() || $object->isArchived()) {
return false;
}
return true;
@ -231,7 +231,7 @@ final class PhamePostEditor
foreach ($xactions as $xaction) {
switch ($xaction->getTransactionType()) {
case PhamePostTransaction::TYPE_VISIBILITY:
if (!$object->isDraft()) {
if (!$object->isDraft() && !$object->isArchived()) {
$body->addRemarkupSection(null, $object->getBody());
}
break;