Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97965882
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
Wed, Jan 8, 01:47
Size
969 B
Mime Type
text/x-php
Expires
Fri, Jan 10, 01:47 (1 d, 3 h)
Engine
blob
Format
Raw Data
Handle
23463453
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