Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106413783
PhabricatorPhurlURLAccessController.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
Tue, Mar 25, 13:40
Size
663 B
Mime Type
text/x-php
Expires
Thu, Mar 27, 13:40 (1 d, 14 h)
Engine
blob
Format
Raw Data
Handle
25138549
Attached To
rPH Phabricator
PhabricatorPhurlURLAccessController.php
View Options
<?php
final
class
PhabricatorPhurlURLAccessController
extends
PhabricatorPhurlController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$id
=
$request
->
getURIData
(
'id'
);
$url
=
id
(
new
PhabricatorPhurlURLQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
executeOne
();
if
(!
$url
)
{
return
new
Aphront404Response
();
}
if
(
$url
->
isValid
())
{
return
id
(
new
AphrontRedirectResponse
())
->
setURI
(
$url
->
getLongURL
())
->
setIsExternal
(
true
);
}
else
{
return
id
(
new
AphrontRedirectResponse
())->
setURI
(
'/'
.
$url
->
getMonogram
());
}
}
}
Event Timeline
Log In to Comment