@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorRepositoryEnormousTransaction
4 extends PhabricatorRepositoryTransactionType {
5
6 const TRANSACTIONTYPE = 'repo:enormous';
7
8 public function generateOldValue($object) {
9 return $object->shouldAllowEnormousChanges();
10 }
11
12 public function applyInternalEffects($object, $value) {
13 $object->setDetail('allow-enormous-changes', $value);
14 }
15
16 public function getTitle() {
17 $new = $this->getNewValue();
18
19 if ($new) {
20 return pht(
21 '%s disabled protection against enormous changes.',
22 $this->renderAuthor());
23 } else {
24 return pht(
25 '%s enabled protection against enormous changes.',
26 $this->renderAuthor());
27 }
28 }
29
30}