Page MenuHomePhabricator

D19912.id47532.diff
No OneTemporary

D19912.id47532.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -10946,7 +10946,6 @@
'PholioDefaultViewCapability' => 'PhabricatorPolicyCapability',
'PholioImage' => array(
'PholioDAO',
- 'PhabricatorMarkupInterface',
'PhabricatorPolicyInterface',
),
'PholioImageDescriptionTransaction' => 'PholioImageTransactionType',
@@ -10962,7 +10961,6 @@
'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
--- a/src/applications/pholio/controller/PholioMockViewController.php
+++ b/src/applications/pholio/controller/PholioMockViewController.php
@@ -37,10 +37,6 @@
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 @@
$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
--- 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 @@
}
-/* -( 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
--- 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 @@
PhabricatorFulltextInterface,
PhabricatorFerretInterface {
- const MARKUP_FIELD_DESCRIPTION = 'markup:description';
-
const STATUS_OPEN = 'open';
const STATUS_CLOSED = 'closed';
@@ -216,41 +213,6 @@
}
-/* -( 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
--- a/src/applications/pholio/view/PholioMockImagesView.php
+++ b/src/applications/pholio/view/PholioMockImagesView.php
@@ -72,13 +72,6 @@
$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 @@
$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().'/';

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 10:18 PM (20 h, 15 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6915229
Default Alt Text
D19912.id47532.diff (5 KB)

Event Timeline