Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96685375
ReleephBranchNamePreviewController.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, Dec 29, 20:03
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Dec 31, 20:03 (2 d)
Engine
blob
Format
Raw Data
Handle
23225389
Attached To
rPH Phabricator
ReleephBranchNamePreviewController.php
View Options
<?php
final
class
ReleephBranchNamePreviewController
extends
ReleephController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$is_symbolic
=
$request
->
getBool
(
'isSymbolic'
);
$template
=
$request
->
getStr
(
'template'
);
if
(!
$is_symbolic
&&
!
$template
)
{
$template
=
ReleephBranchTemplate
::
getDefaultTemplate
();
}
$arc_project_id
=
$request
->
getInt
(
'arcProjectID'
);
$fake_commit_handle
=
ReleephBranchTemplate
::
getFakeCommitHandleFor
(
$arc_project_id
,
$request
->
getUser
());
list
(
$name
,
$errors
)
=
id
(
new
ReleephBranchTemplate
())
->
setCommitHandle
(
$fake_commit_handle
)
->
setReleephProjectName
(
$request
->
getStr
(
'projectName'
))
->
setSymbolic
(
$is_symbolic
)
->
interpolate
(
$template
);
$markup
=
''
;
if
(
$name
)
{
$markup
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'name'
),
$name
);
}
if
(
$errors
)
{
$markup
.=
phutil_tag
(
'div'
,
array
(
'class'
=>
'error'
),
head
(
$errors
));
}
return
id
(
new
AphrontAjaxResponse
())
->
setContent
(
array
(
'markup'
=>
$markup
));
}
}
Event Timeline
Log In to Comment