3 final class PhabricatorRepositoryMaintenanceTransaction
4 extends PhabricatorRepositoryTransactionType
{
6 const TRANSACTIONTYPE
= 'maintenance';
8 public function generateOldValue($object) {
9 return $object->getReadOnlyMessage();
12 public function applyInternalEffects($object, $value) {
13 if ($value === null) {
16 ->setReadOnlyMessage(null);
20 ->setReadOnlyMessage($value);
24 public function getTitle() {
25 $old = $this->getOldValue();
26 $new = $this->getNewValue();
28 if (strlen($old) && !strlen($new)) {
30 '%s took this repository out of maintenance mode.',
31 $this->renderAuthor());
32 } else if (!strlen($old) && strlen($new)) {
34 '%s put this repository into maintenance mode.',
35 $this->renderAuthor());
38 '%s updated the maintenance message for this repository.',
39 $this->renderAuthor());