Use the unified markup cache for Maniphest
Summary: - See D2945. - Drop `cache` field from ManiphestTransaction. - Render task descriptions and transactions through PhabricatorMarkupEngine. - Also pull the list of macros more lazily. Test Plan: - Verified transactions and transaction preview work correctly and interact with cache correctly. - Verified tasks descriptions and task preview work correctly. - Verified we don't hit the imagemacro table when we're rendering everything from cache anymore. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D2946
This commit is contained in:
@@ -88,8 +88,6 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||
$handles = id(new PhabricatorObjectHandleData($phids))
|
||||
->loadHandles();
|
||||
|
||||
$engine = PhabricatorMarkupEngine::newManiphestMarkupEngine();
|
||||
|
||||
$dict = array();
|
||||
$dict['Status'] =
|
||||
'<strong>'.
|
||||
@@ -305,9 +303,18 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||
$headsup_panel->setActionList($action_list);
|
||||
$headsup_panel->setProperties($dict);
|
||||
|
||||
$engine = new PhabricatorMarkupEngine();
|
||||
$engine->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
|
||||
foreach ($transactions as $xaction) {
|
||||
if ($xaction->hasComments()) {
|
||||
$engine->addObject($xaction, ManiphestTransaction::MARKUP_FIELD_BODY);
|
||||
}
|
||||
}
|
||||
$engine->process();
|
||||
|
||||
$headsup_panel->appendChild(
|
||||
'<div class="phabricator-remarkup">'.
|
||||
$engine->markupText($task->getDescription()).
|
||||
$engine->getOutput($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION).
|
||||
'</div>');
|
||||
|
||||
$transaction_types = ManiphestTransactionType::getTransactionTypeMap();
|
||||
|
||||
Reference in New Issue
Block a user