Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14091813
D21708.id51731.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D21708.id51731.diff
View Options
diff --git a/src/applications/phriction/application/PhabricatorPhrictionApplication.php b/src/applications/phriction/application/PhabricatorPhrictionApplication.php
--- a/src/applications/phriction/application/PhabricatorPhrictionApplication.php
+++ b/src/applications/phriction/application/PhabricatorPhrictionApplication.php
@@ -61,7 +61,7 @@
'new/' => 'PhrictionNewController',
'move/(?P<id>[1-9]\d*)/' => 'PhrictionMoveController',
- 'preview/(?P<slug>.*/)' => 'PhrictionMarkupPreviewController',
+ 'preview/' => 'PhrictionMarkupPreviewController',
'diff/(?P<id>[1-9]\d*)/' => 'PhrictionDiffController',
$this->getEditRoutePattern('document/edit/')
diff --git a/src/applications/phriction/controller/PhrictionEditController.php b/src/applications/phriction/controller/PhrictionEditController.php
--- a/src/applications/phriction/controller/PhrictionEditController.php
+++ b/src/applications/phriction/controller/PhrictionEditController.php
@@ -316,9 +316,17 @@
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
->setForm($form);
+ $preview_uri = '/phriction/preview/';
+ $preview_uri = new PhutilURI(
+ $preview_uri,
+ array(
+ 'slug' => $document->getSlug(),
+ ));
+ $preview_uri = phutil_string_cast($preview_uri);
+
$preview = id(new PHUIRemarkupPreviewPanel())
->setHeader($content->getTitle())
- ->setPreviewURI('/phriction/preview/'.$document->getSlug())
+ ->setPreviewURI($preview_uri)
->setControlID('document-textarea')
->setPreviewType(PHUIRemarkupPreviewPanel::DOCUMENT);
diff --git a/src/applications/phriction/controller/PhrictionMarkupPreviewController.php b/src/applications/phriction/controller/PhrictionMarkupPreviewController.php
--- a/src/applications/phriction/controller/PhrictionMarkupPreviewController.php
+++ b/src/applications/phriction/controller/PhrictionMarkupPreviewController.php
@@ -8,7 +8,7 @@
$viewer = $request->getUser();
$text = $request->getStr('text');
- $slug = $request->getURIData('slug');
+ $slug = $request->getStr('slug');
$output = PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 2:31 AM (20 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6787777
Default Alt Text
D21708.id51731.diff (2 KB)
Attached To
Mode
D21708: Fix Phriction document previews for the root document ("/") with Apache option "MergeSlashes On"
Attached
Detach File
Event Timeline
Log In to Comment