Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97434200
PhamePostFramedController.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
Sat, Jan 4, 10:22
Size
969 B
Mime Type
text/x-php
Expires
Mon, Jan 6, 10:22 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23407813
Attached To
rPH Phabricator
PhamePostFramedController.php
View Options
<?php
final
class
PhamePostFramedController
extends
PhamePostController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$id
=
$request
->
getURIData
(
'id'
);
$post
=
id
(
new
PhamePostQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
if
(!
$post
)
{
return
new
Aphront404Response
();
}
$blog
=
$post
->
getBlog
();
$phame_request
=
$request
->
setPath
(
'/post/'
.
$post
->
getPhameTitle
());
$skin
=
$post
->
getBlog
()->
getSkinRenderer
(
$phame_request
);
$uri
=
clone
$request
->
getRequestURI
();
$uri
->
setPath
(
'/phame/live/'
.
$blog
->
getID
().
'/'
);
$skin
->
setPreview
(
true
)
->
setBlog
(
$post
->
getBlog
())
->
setBaseURI
((
string
)
$uri
);
$response
=
$skin
->
processRequest
();
$response
->
setFrameable
(
true
);
return
$response
;
}
}
Event Timeline
Log In to Comment