Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14061979
D15501.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D15501.diff
View Options
diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
--- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -59,15 +59,9 @@
$phids = array_keys($phids);
$handles = $viewer->loadHandles($phids);
- $engine = id(new PhabricatorMarkupEngine())
- ->setViewer($viewer)
- ->setContextObject($task)
- ->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
-
$timeline = $this->buildTransactionTimeline(
$task,
- new ManiphestTransactionQuery(),
- $engine);
+ new ManiphestTransactionQuery());
$monogram = $task->getMonogram();
$crumbs = $this->buildApplicationCrumbs()
@@ -76,7 +70,7 @@
$header = $this->buildHeaderView($task);
$details = $this->buildPropertyView($task, $field_list, $edges, $handles);
- $description = $this->buildDescriptionView($task, $engine);
+ $description = $this->buildDescriptionView($task);
$curtain = $this->buildCurtain($task, $edit_engine);
$title = pht('%s %s', $monogram, $task->getTitle());
@@ -346,12 +340,13 @@
return null;
}
- private function buildDescriptionView(
- ManiphestTask $task,
- PhabricatorMarkupEngine $engine) {
+ private function buildDescriptionView(ManiphestTask $task) {
+ $viewer = $this->getViewer();
$section = null;
- if (strlen($task->getDescription())) {
+
+ $description = $task->getDescription();
+ if (strlen($description)) {
$section = new PHUIPropertyListView();
$section->addTextContent(
phutil_tag(
@@ -359,7 +354,8 @@
array(
'class' => 'phabricator-remarkup',
),
- $engine->getOutput($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION)));
+ id(new PHUIRemarkupView($viewer, $description))
+ ->setContextObject($task)));
}
return $section;
diff --git a/src/infrastructure/markup/view/PHUIRemarkupView.php b/src/infrastructure/markup/view/PHUIRemarkupView.php
--- a/src/infrastructure/markup/view/PHUIRemarkupView.php
+++ b/src/infrastructure/markup/view/PHUIRemarkupView.php
@@ -13,6 +13,7 @@
private $corpus;
private $markupType;
+ private $contextObject;
const DOCUMENT = 'document';
@@ -26,16 +27,27 @@
return $this;
}
+ public function setContextObject($context_object) {
+ $this->contextObject = $context_object;
+ return $this;
+ }
+
+ public function getContextObject() {
+ return $this->contextObject;
+ }
+
public function render() {
$viewer = $this->getUser();
$corpus = $this->corpus;
+ $context = $this->getContextObject();
$content = PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())
->setPreserveLinebreaks(true)
->setContent($corpus),
'default',
- $viewer);
+ $viewer,
+ $context);
if ($this->markupType == self::DOCUMENT) {
return phutil_tag(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 9:38 AM (6 h, 52 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718386
Default Alt Text
D15501.diff (3 KB)
Attached To
Mode
D15501: Fix unusual use of Remarkup in Maniphest
Attached
Detach File
Event Timeline
Log In to Comment