Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102663667
PhrictionDocumentPreviewController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 23, 00:29
Size
714 B
Mime Type
text/x-php
Expires
Tue, Feb 25, 00:29 (2 d)
Engine
blob
Format
Raw Data
Handle
24362630
Attached To
rPH Phabricator
PhrictionDocumentPreviewController.php
View Options
<?php
/**
* @group phriction
*/
final
class
PhrictionDocumentPreviewController
extends
PhrictionController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$document
=
$request
->
getStr
(
'document'
);
$draft_key
=
$request
->
getStr
(
'draftkey'
);
if
(
$draft_key
)
{
id
(
new
PhabricatorDraft
())
->
setAuthorPHID
(
$request
->
getUser
()->
getPHID
())
->
setDraftKey
(
$draft_key
)
->
setDraft
(
$document
)
->
replaceOrDelete
();
}
$content_obj
=
new
PhrictionContent
();
$content_obj
->
setContent
(
$document
);
$content
=
$content_obj
->
renderContent
(
$request
->
getUser
());
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$content
);
}
}
Event Timeline
Log In to Comment