Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php
index 3c56bf75c0..d1bf5469f7 100644
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php
@@ -1,77 +1,88 @@
<?php
final class PhabricatorStandardCustomFieldRemarkup
extends PhabricatorStandardCustomField {
public function getFieldType() {
return 'remarkup';
}
public function renderEditControl(array $handles) {
return id(new PhabricatorRemarkupControl())
->setUser($this->getViewer())
->setLabel($this->getFieldName())
->setName($this->getFieldKey())
->setCaption($this->getCaption())
->setValue($this->getFieldValue());
}
public function getStyleForPropertyView() {
return 'block';
}
public function getApplicationTransactionRemarkupBlocks(
PhabricatorApplicationTransaction $xaction) {
return array(
$xaction->getNewValue(),
);
}
public function renderPropertyViewValue(array $handles) {
$value = $this->getFieldValue();
if (!strlen($value)) {
return null;
}
// TODO: Once this stabilizes, it would be nice to let fields batch this.
// For now, an extra query here and there on object detail pages isn't the
// end of the world.
$viewer = $this->getViewer();
return PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())
->setContent($value)
->setPReserveLinebreaks(true),
'default',
$viewer);
}
public function getApplicationTransactionTitle(
PhabricatorApplicationTransaction $xaction) {
$author_phid = $xaction->getAuthorPHID();
-
- // TODO: Expose fancy transactions.
-
return pht(
'%s edited %s.',
$xaction->renderHandleLink($author_phid),
$this->getFieldName());
}
+ public function getApplicationTransactionHasChangeDetails(
+ PhabricatorApplicationTransaction $xaction) {
+ return true;
+ }
+
+ public function getApplicationTransactionChangeDetails(
+ PhabricatorApplicationTransaction $xaction,
+ PhabricatorUser $viewer) {
+ return $xaction->renderTextCorpusChangeDetails(
+ $viewer,
+ $xaction->getOldValue(),
+ $xaction->getNewValue());
+ }
+
public function shouldAppearInHerald() {
return true;
}
public function getHeraldFieldConditions() {
return array(
HeraldAdapter::CONDITION_CONTAINS,
HeraldAdapter::CONDITION_NOT_CONTAINS,
HeraldAdapter::CONDITION_IS,
HeraldAdapter::CONDITION_IS_NOT,
HeraldAdapter::CONDITION_REGEXP,
);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jul 1, 5:11 PM (15 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
164482
Default Alt Text
(2 KB)

Event Timeline