mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-02 15:38:18 +02:00
Summary: Updates Phame for new modern methods. Test Plan: New blog, edit blog, new post, edit post, publish post. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14419
26 lines
593 B
PHP
26 lines
593 B
PHP
<?php
|
|
|
|
final class PhamePostPreviewController extends PhamePostController {
|
|
|
|
protected function getSideNavFilter() {
|
|
return null;
|
|
}
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$viewer = $request->getViewer();
|
|
$body = $request->getStr('body');
|
|
|
|
$post = id(new PhamePost())
|
|
->setBody($body);
|
|
|
|
$content = PhabricatorMarkupEngine::renderOneObject(
|
|
$post,
|
|
PhamePost::MARKUP_FIELD_BODY,
|
|
$viewer);
|
|
|
|
$content = phutil_tag_div('phabricator-remarkup', $content);
|
|
|
|
return id(new AphrontAjaxResponse())->setContent($content);
|
|
}
|
|
|
|
}
|