Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/editor/PhamePostEditor.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | switch ($xaction->getTransactionType()) { | ||||
case PhamePostTransaction::TYPE_PHAME_TITLE: | case PhamePostTransaction::TYPE_PHAME_TITLE: | ||||
return $object->setPhameTitle($xaction->getNewValue()); | return $object->setPhameTitle($xaction->getNewValue()); | ||||
case PhamePostTransaction::TYPE_BODY: | case PhamePostTransaction::TYPE_BODY: | ||||
return $object->setBody($xaction->getNewValue()); | return $object->setBody($xaction->getNewValue()); | ||||
case PhamePostTransaction::TYPE_VISIBILITY: | case PhamePostTransaction::TYPE_VISIBILITY: | ||||
if ($xaction->getNewValue() == PhameConstants::VISIBILITY_DRAFT) { | if ($xaction->getNewValue() == PhameConstants::VISIBILITY_DRAFT) { | ||||
$object->setDatePublished(0); | $object->setDatePublished(0); | ||||
} else { | } else { | ||||
$object->setDatePublished(time()); | $object->setDatePublished(PhabricatorTime::getNow()); | ||||
} | } | ||||
return $object->setVisibility($xaction->getNewValue()); | return $object->setVisibility($xaction->getNewValue()); | ||||
} | } | ||||
return parent::applyCustomInternalTransaction($object, $xaction); | return parent::applyCustomInternalTransaction($object, $xaction); | ||||
} | } | ||||
protected function applyCustomExternalTransaction( | protected function applyCustomExternalTransaction( | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |