Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93885099
PhabricatorConfigIssueViewController.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
Mon, Dec 2, 06:35
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 4, 06:35 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22717762
Attached To
rPH Phabricator
PhabricatorConfigIssueViewController.php
View Options
<?php
final
class
PhabricatorConfigIssueViewController
extends
PhabricatorConfigController
{
private
$issueKey
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
issueKey
=
$data
[
'key'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$issues
=
PhabricatorSetupCheck
::
runAllChecks
();
PhabricatorSetupCheck
::
setOpenSetupIssueCount
(
PhabricatorSetupCheck
::
countUnignoredIssues
(
$issues
));
if
(
empty
(
$issues
[
$this
->
issueKey
]))
{
$content
=
id
(
new
AphrontErrorView
())
->
setSeverity
(
AphrontErrorView
::
SEVERITY_NOTICE
)
->
setTitle
(
pht
(
'Issue Resolved'
))
->
appendChild
(
pht
(
'This setup issue has been resolved. '
))
->
appendChild
(
phutil_tag
(
'a'
,
array
(
'href'
=>
$this
->
getApplicationURI
(
'issue/'
),
),
pht
(
'Return to Open Issue List'
)));
$title
=
pht
(
'Resolved Issue'
);
}
else
{
$issue
=
$issues
[
$this
->
issueKey
];
$content
=
$this
->
renderIssue
(
$issue
);
$title
=
$issue
->
getShortName
();
}
$crumbs
=
$this
->
buildApplicationCrumbs
()
->
addCrumb
(
id
(
new
PhabricatorCrumbView
())
->
setName
(
pht
(
'Setup Issues'
))
->
setHref
(
$this
->
getApplicationURI
(
'issue/'
)))
->
addCrumb
(
id
(
new
PhabricatorCrumbView
())
->
setName
(
$title
)
->
setHref
(
$request
->
getRequestURI
()));
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$content
,
),
array
(
'title'
=>
$title
,
'device'
=>
true
,
));
}
private
function
renderIssue
(
PhabricatorSetupIssue
$issue
)
{
require_celerity_resource
(
'setup-issue-css'
);
$view
=
new
PhabricatorSetupIssueView
();
$view
->
setIssue
(
$issue
);
$container
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'setup-issue-background'
,
),
$view
->
render
());
return
$container
;
}
}
Event Timeline
Log In to Comment