From e78488f6eb7c5d36c60405e6b2c841cac14dacb3 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 13 Jun 2016 10:52:14 -0700 Subject: [PATCH] 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 --- src/applications/phame/editor/PhamePostEditor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applications/phame/editor/PhamePostEditor.php b/src/applications/phame/editor/PhamePostEditor.php index 96f2c2016f..b10484723d 100644 --- a/src/applications/phame/editor/PhamePostEditor.php +++ b/src/applications/phame/editor/PhamePostEditor.php @@ -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;