From ee8de4a9ec550adc6424a0e05c5f26a6cccd1922 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 13 Jun 2015 06:53:36 -0700 Subject: [PATCH] Fix an issue with `{M13}` and Spaces Fixes T8529. These elements now need a viewer/object to render Spaces. Auditors: btrahan --- src/applications/pholio/remarkup/PholioRemarkupRule.php | 3 +++ src/applications/pholio/view/PholioMockEmbedView.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/applications/pholio/remarkup/PholioRemarkupRule.php b/src/applications/pholio/remarkup/PholioRemarkupRule.php index 2b1ca0f876..00025b6326 100644 --- a/src/applications/pholio/remarkup/PholioRemarkupRule.php +++ b/src/applications/pholio/remarkup/PholioRemarkupRule.php @@ -64,7 +64,10 @@ final class PholioRemarkupRule extends PhabricatorObjectRemarkupRule { PhabricatorObjectHandle $handle, $options) { + $viewer = $this->getEngine()->getConfig('viewer'); + $embed_mock = id(new PholioMockEmbedView()) + ->setUser($viewer) ->setMock($object); if (strlen($options)) { diff --git a/src/applications/pholio/view/PholioMockEmbedView.php b/src/applications/pholio/view/PholioMockEmbedView.php index 3429cfd569..88f2f2ac55 100644 --- a/src/applications/pholio/view/PholioMockEmbedView.php +++ b/src/applications/pholio/view/PholioMockEmbedView.php @@ -47,6 +47,8 @@ final class PholioMockEmbedView extends AphrontView { list($x, $y) = $xform->getTransformedDimensions($thumbfile); $item = id(new PHUIPinboardItemView()) + ->setUser($this->getUser()) + ->setObject($mock) ->setHeader($header) ->setURI($uri) ->setImageURI($thumbnail)