Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890969
PhabricatorRepositoryMaintenanceTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorRepositoryMaintenanceTransaction.php
View Options
<?php
final
class
PhabricatorRepositoryMaintenanceTransaction
extends
PhabricatorRepositoryTransactionType
{
const
TRANSACTIONTYPE
=
'maintenance'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getReadOnlyMessage
(
)
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
if
(
$value
===
null
)
{
$object
->
setReadOnly
(
false
)
->
setReadOnlyMessage
(
null
)
;
}
else
{
$object
->
setReadOnly
(
true
)
->
setReadOnlyMessage
(
$value
)
;
}
}
public
function
getTitle
(
)
{
$old
=
$this
->
getOldValue
(
)
;
$new
=
$this
->
getNewValue
(
)
;
$old_nonempty
=
phutil_nonempty_string
(
$old
)
;
$new_nonempty
=
phutil_nonempty_string
(
$new
)
;
if
(
$old_nonempty
&&
!
$new_nonempty
)
{
return
pht
(
'%s took this repository out of maintenance mode.'
,
$this
->
renderAuthor
(
)
)
;
}
else
if
(
!
$old_nonempty
&&
$new_nonempty
)
{
return
pht
(
'%s put this repository into maintenance mode.'
,
$this
->
renderAuthor
(
)
)
;
}
else
{
return
pht
(
'%s updated the maintenance message for this repository.'
,
$this
->
renderAuthor
(
)
)
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 14:24 (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1125479
Default Alt Text
PhabricatorRepositoryMaintenanceTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment