Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1081307
PhabricatorConfigResponse.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
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
();
return
hsprintf
(
'<!DOCTYPE html>'
.
'<html>'
.
'<head>'
.
'<meta charset="UTF-8" />'
.
'<title>Phabricator Setup</title>'
.
'%s'
.
'</head>'
.
'<body class="setup-fatal">%s</body>'
.
'</html>'
,
$resources
,
$view
);
}
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
[]
=
phutil_tag
(
'style'
,
array
(
'type'
=>
'text/css'
),
Filesystem
::
readFile
(
$webroot
.
'/rsrc/css/'
.
$path
));
}
return
phutil_implode_html
(
"
\n
"
,
$resources
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jun 29, 9:33 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
264767
Default Alt Text
PhabricatorConfigResponse.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment