diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 8478bb45d5..deaaae0e98 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -10946,7 +10946,6 @@ phutil_register_library_map(array( 'PholioDefaultViewCapability' => 'PhabricatorPolicyCapability', 'PholioImage' => array( 'PholioDAO', - 'PhabricatorMarkupInterface', 'PhabricatorPolicyInterface', ), 'PholioImageDescriptionTransaction' => 'PholioImageTransactionType', @@ -10962,7 +10961,6 @@ phutil_register_library_map(array( 'PholioInlineListController' => 'PholioController', 'PholioMock' => array( 'PholioDAO', - 'PhabricatorMarkupInterface', 'PhabricatorPolicyInterface', 'PhabricatorSubscribableInterface', 'PhabricatorTokenReceiverInterface', diff --git a/src/applications/pholio/controller/PholioMockViewController.php b/src/applications/pholio/controller/PholioMockViewController.php index 2ab31d0d96..fd601f0a32 100644 --- a/src/applications/pholio/controller/PholioMockViewController.php +++ b/src/applications/pholio/controller/PholioMockViewController.php @@ -37,10 +37,6 @@ final class PholioMockViewController extends PholioController { PholioMockHasTaskEdgeType::EDGECONST); $this->setManiphestTaskPHIDs($phids); - $engine = id(new PhabricatorMarkupEngine()) - ->setViewer($viewer); - $engine->addObject($mock, PholioMock::MARKUP_FIELD_DESCRIPTION); - $title = $mock->getName(); if ($mock->isClosed()) { @@ -62,8 +58,7 @@ final class PholioMockViewController extends PholioController { $timeline = $this->buildTransactionTimeline( $mock, - new PholioTransactionQuery(), - $engine); + new PholioTransactionQuery()); $timeline->setMock($mock); $curtain = $this->buildCurtainView($mock); diff --git a/src/applications/pholio/storage/PholioImage.php b/src/applications/pholio/storage/PholioImage.php index e0b55bae10..92694fb806 100644 --- a/src/applications/pholio/storage/PholioImage.php +++ b/src/applications/pholio/storage/PholioImage.php @@ -2,11 +2,8 @@ final class PholioImage extends PholioDAO implements - PhabricatorMarkupInterface, PhabricatorPolicyInterface { - const MARKUP_FIELD_DESCRIPTION = 'markup:description'; - protected $mockID; protected $filePHID; protected $name; @@ -86,32 +83,9 @@ final class PholioImage extends PholioDAO } -/* -( PhabricatorMarkupInterface )----------------------------------------- */ - - - public function getMarkupFieldKey($field) { - $content = $this->getMarkupText($field); - return PhabricatorMarkupEngine::digestRemarkupContent($this, $content); - } - - public function newMarkupEngine($field) { - return PhabricatorMarkupEngine::newMarkupEngine(array()); - } - - public function getMarkupText($field) { - return $this->getDescription(); - } - - public function didMarkupText($field, $output, PhutilMarkupEngine $engine) { - return $output; - } - - public function shouldUseMarkupCache($field) { - return (bool)$this->getID(); - } - /* -( PhabricatorPolicyInterface Implementation )-------------------------- */ + public function getCapabilities() { return $this->getMock()->getCapabilities(); } diff --git a/src/applications/pholio/storage/PholioMock.php b/src/applications/pholio/storage/PholioMock.php index 7ce4ece479..cf32a34131 100644 --- a/src/applications/pholio/storage/PholioMock.php +++ b/src/applications/pholio/storage/PholioMock.php @@ -2,7 +2,6 @@ final class PholioMock extends PholioDAO implements - PhabricatorMarkupInterface, PhabricatorPolicyInterface, PhabricatorSubscribableInterface, PhabricatorTokenReceiverInterface, @@ -15,8 +14,6 @@ final class PholioMock extends PholioDAO PhabricatorFulltextInterface, PhabricatorFerretInterface { - const MARKUP_FIELD_DESCRIPTION = 'markup:description'; - const STATUS_OPEN = 'open'; const STATUS_CLOSED = 'closed'; @@ -216,41 +213,6 @@ final class PholioMock extends PholioDAO } -/* -( PhabricatorMarkupInterface )----------------------------------------- */ - - - public function getMarkupFieldKey($field) { - $content = $this->getMarkupText($field); - return PhabricatorMarkupEngine::digestRemarkupContent($this, $content); - } - - public function newMarkupEngine($field) { - return PhabricatorMarkupEngine::newMarkupEngine(array()); - } - - public function getMarkupText($field) { - if ($this->getDescription()) { - return $this->getDescription(); - } - - return null; - } - - public function didMarkupText($field, $output, PhutilMarkupEngine $engine) { - require_celerity_resource('phabricator-remarkup-css'); - return phutil_tag( - 'div', - array( - 'class' => 'phabricator-remarkup', - ), - $output); - } - - public function shouldUseMarkupCache($field) { - return (bool)$this->getID(); - } - - /* -( PhabricatorApplicationTransactionInterface )------------------------- */ diff --git a/src/applications/pholio/view/PholioMockImagesView.php b/src/applications/pholio/view/PholioMockImagesView.php index c95d8827d3..d5ac41cd03 100644 --- a/src/applications/pholio/view/PholioMockImagesView.php +++ b/src/applications/pholio/view/PholioMockImagesView.php @@ -72,13 +72,6 @@ final class PholioMockImagesView extends AphrontView { $default = PhabricatorFile::loadBuiltin($viewer, 'image-100x100.png'); - $engine = id(new PhabricatorMarkupEngine()) - ->setViewer($this->getUser()); - foreach ($mock->getAllImages() as $image) { - $engine->addObject($image, 'default'); - } - $engine->process(); - $images = array(); $current_set = 0; foreach ($mock->getAllImages() as $image) { @@ -92,14 +85,9 @@ final class PholioMockImagesView extends AphrontView { $current_set++; } - $description = $engine->getOutput($image, 'default'); + $description = $image->getDescription(); if (strlen($description)) { - $description = phutil_tag( - 'div', - array( - 'class' => 'phabricator-remarkup', - ), - $description); + $description = new PHUIRemarkupView($viewer, $description); } $history_uri = '/pholio/image/history/'.$image->getID().'/';