1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +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( protected function shouldSendMail(
PhabricatorLiskDAO $object, PhabricatorLiskDAO $object,
array $xactions) { array $xactions) {
if ($object->isDraft()) { if ($object->isDraft() || ($object->isArchived())) {
return false; return false;
} }
return true; return true;
@ -180,7 +180,7 @@ final class PhamePostEditor
protected function shouldPublishFeedStory( protected function shouldPublishFeedStory(
PhabricatorLiskDAO $object, PhabricatorLiskDAO $object,
array $xactions) { array $xactions) {
if ($object->isDraft()) { if ($object->isDraft() || $object->isArchived()) {
return false; return false;
} }
return true; return true;
@ -231,7 +231,7 @@ final class PhamePostEditor
foreach ($xactions as $xaction) { foreach ($xactions as $xaction) {
switch ($xaction->getTransactionType()) { switch ($xaction->getTransactionType()) {
case PhamePostTransaction::TYPE_VISIBILITY: case PhamePostTransaction::TYPE_VISIBILITY:
if (!$object->isDraft()) { if (!$object->isDraft() && !$object->isArchived()) {
$body->addRemarkupSection(null, $object->getBody()); $body->addRemarkupSection(null, $object->getBody());
} }
break; break;