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

Fix Phame Post creation time

Summary: I spent way to long to arrive at this solution. Ref T9360

Test Plan: Publish a new post, see time, unpublish post, see draft. Start a new post, wait 10 minutes, publish, see "now".

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9360

Differential Revision: https://secure.phabricator.com/D14656
This commit is contained in:
Chad Little 2015-12-03 13:43:35 -08:00
parent dc0d914134
commit 39903769f0
3 changed files with 3 additions and 3 deletions

View file

@ -146,7 +146,7 @@ final class PhamePostEditController extends PhamePostController {
id(new AphrontFormSelectControl())
->setLabel(pht('Visibility'))
->setName('visibility')
->setvalue($visibility)
->setValue($visibility)
->setOptions(PhameConstants::getPhamePostStatusMap()))
->appendChild(
id(new PhabricatorRemarkupControl())

View file

@ -67,7 +67,7 @@ final class PhamePostEditor
if ($xaction->getNewValue() == PhameConstants::VISIBILITY_DRAFT) {
$object->setDatePublished(0);
} else {
$object->setDatePublished(time());
$object->setDatePublished(PhabricatorTime::getNow());
}
return $object->setVisibility($xaction->getNewValue());
}

View file

@ -34,7 +34,7 @@ final class PhamePost extends PhameDAO
->setBloggerPHID($blogger->getPHID())
->setBlogPHID($blog->getPHID())
->setBlog($blog)
->setDatePublished(0)
->setDatePublished(PhabricatorTime::getNow())
->setVisibility(PhameConstants::VISIBILITY_PUBLISHED);
return $post;
}