Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118944735
PhabricatorConfigResponse.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, Jun 23, 05:17
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Jun 25, 05:17 (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
26951699
Attached To
rPH Phabricator
PhabricatorConfigResponse.php
View Options
<?php
final
class
PhabricatorConfigResponse
extends
AphrontHTMLResponse
{
private
$view
;
public
function
setView
(
PhabricatorSetupIssueView
$view
)
{
$this
->
view
=
$view
;
return
$this
;
}
public
function
buildResponseString
()
{
// Check to make sure we aren't requesting this via ajax or conduit
if
(
isset
(
$_REQUEST
[
'__ajax__'
])
||
isset
(
$_REQUEST
[
'__conduit__'
]))
{
// We don't want to flood the console with html, just return a simple
// message for now.
return
pht
(
"This install has a fatal setup error, access the internet web "
.
"version to view details and resolve it."
);
}
$resources
=
$this
->
buildResources
();
$view
=
$this
->
view
->
render
();
$template
=
<<<EOTEMPLATE
<!doctype html>
<html>
<head>
<title>Phabricator Setup</title>
{$resources}
</head>
<body class="setup-fatal">
{$view}
</body>
</html>
EOTEMPLATE;
return
$template
;
}
private
function
buildResources
()
{
$css
=
array
(
'application/config/config-template.css'
,
'application/config/setup-issue.css'
,
);
$webroot
=
dirname
(
phutil_get_library_root
(
'phabricator'
)).
'/webroot/'
;
$resources
=
array
();
foreach
(
$css
as
$path
)
{
$resources
[]
=
'<style type="text/css">'
;
$resources
[]
=
Filesystem
::
readFile
(
$webroot
.
'/rsrc/css/'
.
$path
);
$resources
[]
=
'</style>'
;
}
return
implode
(
"
\n
"
,
$resources
);
}
}
Event Timeline
Log In to Comment