Page MenuHomePhabricator

D14656.diff
No OneTemporary

D14656.diff

diff --git a/src/applications/phame/controller/post/PhamePostEditController.php b/src/applications/phame/controller/post/PhamePostEditController.php
--- a/src/applications/phame/controller/post/PhamePostEditController.php
+++ b/src/applications/phame/controller/post/PhamePostEditController.php
@@ -146,7 +146,7 @@
id(new AphrontFormSelectControl())
->setLabel(pht('Visibility'))
->setName('visibility')
- ->setvalue($visibility)
+ ->setValue($visibility)
->setOptions(PhameConstants::getPhamePostStatusMap()))
->appendChild(
id(new PhabricatorRemarkupControl())
diff --git a/src/applications/phame/editor/PhamePostEditor.php b/src/applications/phame/editor/PhamePostEditor.php
--- a/src/applications/phame/editor/PhamePostEditor.php
+++ b/src/applications/phame/editor/PhamePostEditor.php
@@ -67,7 +67,7 @@
if ($xaction->getNewValue() == PhameConstants::VISIBILITY_DRAFT) {
$object->setDatePublished(0);
} else {
- $object->setDatePublished(time());
+ $object->setDatePublished(PhabricatorTime::getNow());
}
return $object->setVisibility($xaction->getNewValue());
}
diff --git a/src/applications/phame/storage/PhamePost.php b/src/applications/phame/storage/PhamePost.php
--- a/src/applications/phame/storage/PhamePost.php
+++ b/src/applications/phame/storage/PhamePost.php
@@ -34,7 +34,7 @@
->setBloggerPHID($blogger->getPHID())
->setBlogPHID($blog->getPHID())
->setBlog($blog)
- ->setDatePublished(0)
+ ->setDatePublished(PhabricatorTime::getNow())
->setVisibility(PhameConstants::VISIBILITY_PUBLISHED);
return $post;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 2, 6:58 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6739971
Default Alt Text
D14656.diff (1 KB)

Event Timeline