Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112321907
PhabricatorSystemReadOnlyController.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
Sat, May 10, 00:40
Size
1 KB
Mime Type
text/x-php
Expires
Mon, May 12, 00:40 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26062321
Attached To
rPH Phabricator
PhabricatorSystemReadOnlyController.php
View Options
<?php
final
class
PhabricatorSystemReadOnlyController
extends
PhabricatorController
{
public
function
shouldRequireLogin
()
{
return
false
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$reason
=
$request
->
getURIData
(
'reason'
);
$body
=
array
();
switch
(
$reason
)
{
case
PhabricatorEnv
::
READONLY_CONFIG
:
$title
=
pht
(
'Administrative Read-Only Mode'
);
$body
[]
=
pht
(
'An administrator has placed Phabricator into read-only mode.'
);
$body
[]
=
pht
(
'This mode may be used to perform temporary maintenance, test '
.
'configuration, or archive an installation permanently.'
);
$body
[]
=
pht
(
'Read-only mode was enabled by the explicit action of a human '
.
'administrator, so you can get more information about why it '
.
'has been turned on by rolling your chair away from your desk and '
.
'yelling "Hey! Why is Phabricator in read-only mode??!" using '
.
'your very loudest outside voice.'
);
$button
=
pht
(
'Wait Patiently'
);
break
;
default
:
return
new
Aphront404Response
();
}
$body
[]
=
pht
(
'In read-only mode you can read existing information, but you will not '
.
'be able to edit information or create new information until this mode '
.
'is disabled.'
);
$dialog
=
$this
->
newDialog
()
->
setTitle
(
$title
)
->
setWidth
(
AphrontDialogView
::
WIDTH_FORM
)
->
addCancelButton
(
'/'
,
$button
);
foreach
(
$body
as
$paragraph
)
{
$dialog
->
appendParagraph
(
$paragraph
);
}
return
$dialog
;
}
}
Event Timeline
Log In to Comment