1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-08 10:24:48 +01:00

Fix publish time on Phame Posts

Summary: This logic is inverted. Re-vert it.

Test Plan: Write and publish a new post, see publish time.

Reviewers: epriestley, joshuaspence

Reviewed By: joshuaspence

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14464
This commit is contained in:
Chad Little 2015-11-13 16:52:05 +00:00 committed by chad
parent 4e4ab36f06
commit 50d158a8c4

View file

@ -65,9 +65,9 @@ final class PhamePostEditor
return $object->setBody($xaction->getNewValue());
case PhamePostTransaction::TYPE_VISIBILITY:
if ($xaction->getNewValue() == PhameConstants::VISIBILITY_DRAFT) {
$object->setDatePublished(time());
} else {
$object->setDatePublished(0);
} else {
$object->setDatePublished(time());
}
return $object->setVisibility($xaction->getNewValue());
}