Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101832200
PhabricatorConfigIssuePanelController.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
Fri, Feb 14, 04:32
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Feb 16, 04:32 (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
24239240
Attached To
rPH Phabricator
PhabricatorConfigIssuePanelController.php
View Options
<?php
final
class
PhabricatorConfigIssuePanelController
extends
PhabricatorConfigController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$open_items
=
PhabricatorSetupCheck
::
getOpenSetupIssueKeys
();
$issues
=
PhabricatorSetupCheck
::
runNormalChecks
();
PhabricatorSetupCheck
::
setOpenSetupIssueKeys
(
PhabricatorSetupCheck
::
getUnignoredIssueKeys
(
$issues
),
$update_database
=
true
);
if
(
$issues
)
{
require_celerity_resource
(
'phabricator-notification-menu-css'
);
$items
=
array
();
foreach
(
$issues
as
$issue
)
{
$classes
=
array
();
$classes
[]
=
'phabricator-notification'
;
if
(
$issue
->
getIsIgnored
())
{
$classes
[]
=
'phabricator-notification-read'
;
}
else
{
$classes
[]
=
'phabricator-notification-unread'
;
}
$uri
=
'/config/issue/'
.
$issue
->
getIssueKey
().
'/'
;
$title
=
$issue
->
getName
();
$summary
=
$issue
->
getSummary
();
$items
[]
=
javelin_tag
(
'div'
,
array
(
'class'
=>
implode
(
' '
,
$classes
),
'sigil'
=>
'notification'
,
'meta'
=>
array
(
'href'
=>
$uri
,
),
),
$title
);
}
$content
=
phutil_tag_div
(
'setup-issue-menu'
,
$items
);
}
else
{
$content
=
phutil_tag_div
(
'phabricator-notification no-notifications'
,
pht
(
'You have no unresolved setup issues.'
));
}
$content
=
hsprintf
(
'<div class="phabricator-notification-header">%s</div>'
.
'%s'
,
phutil_tag
(
'a'
,
array
(
'href'
=>
'/config/issue/'
,
),
pht
(
'Unresolved Setup Issues'
)),
$content
);
$unresolved_count
=
count
(
$open_items
);
$json
=
array
(
'content'
=>
$content
,
'number'
=>
(
int
)
$unresolved_count
,
);
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$json
);
}
}
Event Timeline
Log In to Comment