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:
parent
dc0d914134
commit
39903769f0
3 changed files with 3 additions and 3 deletions
|
@ -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())
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue