@@ -398,7 +398,7 @@ private function adjustTransactionValues(
398
398
$ new = $ xaction ->getNewValue ();
399
399
400
400
$ type = $ xaction ->getTransactionType ();
401
- $ xtype = $ this ->getModularTransactionType ($ type );
401
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
402
402
if ($ xtype ) {
403
403
$ xtype = clone $ xtype ;
404
404
$ xtype ->setStorage ($ xaction );
@@ -493,7 +493,7 @@ private function getTransactionOldValue(
493
493
494
494
$ type = $ xaction ->getTransactionType ();
495
495
496
- $ xtype = $ this ->getModularTransactionType ($ type );
496
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
497
497
if ($ xtype ) {
498
498
$ xtype = clone $ xtype ;
499
499
$ xtype ->setStorage ($ xaction );
@@ -591,7 +591,7 @@ private function getTransactionNewValue(
591
591
592
592
$ type = $ xaction ->getTransactionType ();
593
593
594
- $ xtype = $ this ->getModularTransactionType ($ type );
594
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
595
595
if ($ xtype ) {
596
596
$ xtype = clone $ xtype ;
597
597
$ xtype ->setStorage ($ xaction );
@@ -712,7 +712,7 @@ protected function transactionHasEffect(
712
712
}
713
713
714
714
$ type = $ xaction ->getTransactionType ();
715
- $ xtype = $ this ->getModularTransactionType ($ type );
715
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
716
716
if ($ xtype ) {
717
717
return $ xtype ->getTransactionHasEffect (
718
718
$ object ,
@@ -745,7 +745,7 @@ private function applyInternalEffects(
745
745
746
746
$ type = $ xaction ->getTransactionType ();
747
747
748
- $ xtype = $ this ->getModularTransactionType ($ type );
748
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
749
749
if ($ xtype ) {
750
750
$ xtype = clone $ xtype ;
751
751
$ xtype ->setStorage ($ xaction );
@@ -783,7 +783,7 @@ private function applyExternalEffects(
783
783
784
784
$ type = $ xaction ->getTransactionType ();
785
785
786
- $ xtype = $ this ->getModularTransactionType ($ type );
786
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
787
787
if ($ xtype ) {
788
788
$ xtype = clone $ xtype ;
789
789
$ xtype ->setStorage ($ xaction );
@@ -1120,7 +1120,7 @@ final protected function didCommitTransactions(
1120
1120
continue ;
1121
1121
}
1122
1122
1123
- $ xtype = $ this ->getModularTransactionType ($ type );
1123
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
1124
1124
if (!$ xtype ) {
1125
1125
continue ;
1126
1126
}
@@ -1861,7 +1861,7 @@ private function applyCapabilityChecks(
1861
1861
foreach ($ xactions as $ xaction ) {
1862
1862
$ type = $ xaction ->getTransactionType ();
1863
1863
1864
- $ xtype = $ this ->getModularTransactionType ($ type );
1864
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
1865
1865
if (!$ xtype ) {
1866
1866
$ capabilities = $ this ->getLegacyRequiredCapabilities ($ xaction );
1867
1867
} else {
@@ -2136,11 +2136,11 @@ protected function mergeTransactions(
2136
2136
PhabricatorApplicationTransaction $ u ,
2137
2137
PhabricatorApplicationTransaction $ v ) {
2138
2138
2139
+ $ object = $ this ->object ;
2139
2140
$ type = $ u ->getTransactionType ();
2140
2141
2141
- $ xtype = $ this ->getModularTransactionType ($ type );
2142
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
2142
2143
if ($ xtype ) {
2143
- $ object = $ this ->object ;
2144
2144
return $ xtype ->mergeTransactions ($ object , $ u , $ v );
2145
2145
}
2146
2146
@@ -2866,7 +2866,7 @@ protected function validateTransaction(
2866
2866
2867
2867
$ errors = array ();
2868
2868
2869
- $ xtype = $ this ->getModularTransactionType ($ type );
2869
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
2870
2870
if ($ xtype ) {
2871
2871
$ errors [] = $ xtype ->validateTransactions ($ object , $ xactions );
2872
2872
}
@@ -4009,8 +4009,9 @@ protected function addHeadersAndCommentsToMailBody(
4009
4009
4010
4010
private function getMailDiffSectionHeader ($ xaction ) {
4011
4011
$ type = $ xaction ->getTransactionType ();
4012
+ $ object = $ this ->object ;
4012
4013
4013
- $ xtype = $ this ->getModularTransactionType ($ type );
4014
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
4014
4015
if ($ xtype ) {
4015
4016
return $ xtype ->getMailDiffSectionHeader ();
4016
4017
}
@@ -4408,7 +4409,7 @@ private function extractFilePHIDs(
4408
4409
foreach ($ xactions as $ xaction ) {
4409
4410
$ type = $ xaction ->getTransactionType ();
4410
4411
4411
- $ xtype = $ this ->getModularTransactionType ($ type );
4412
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
4412
4413
if ($ xtype ) {
4413
4414
$ phids [] = $ xtype ->extractFilePHIDs ($ object , $ xaction ->getNewValue ());
4414
4415
} else {
@@ -4954,9 +4955,11 @@ private function updateWorkboardColumns($object, $const, $old, $new) {
4954
4955
$ proxy_phids );
4955
4956
}
4956
4957
4957
- private function getModularTransactionTypes () {
4958
+ private function getModularTransactionTypes (
4959
+ PhabricatorLiskDAO $ object ) {
4960
+
4958
4961
if ($ this ->modularTypes === null ) {
4959
- $ template = $ this -> object ->getApplicationTransactionTemplate ();
4962
+ $ template = $ object ->getApplicationTransactionTemplate ();
4960
4963
if ($ template instanceof PhabricatorModularTransaction) {
4961
4964
$ xtypes = $ template ->newModularTransactionTypes ();
4962
4965
foreach ($ xtypes as $ key => $ xtype ) {
@@ -4974,8 +4977,8 @@ private function getModularTransactionTypes() {
4974
4977
return $ this ->modularTypes ;
4975
4978
}
4976
4979
4977
- private function getModularTransactionType ($ type ) {
4978
- $ types = $ this ->getModularTransactionTypes ();
4980
+ private function getModularTransactionType ($ object , $ type ) {
4981
+ $ types = $ this ->getModularTransactionTypes ($ object );
4979
4982
return idx ($ types , $ type );
4980
4983
}
4981
4984
@@ -5535,7 +5538,7 @@ private function newMFATransactions(
5535
5538
foreach ($ xactions as $ xaction ) {
5536
5539
$ type = $ xaction ->getTransactionType ();
5537
5540
5538
- $ xtype = $ this ->getModularTransactionType ($ type );
5541
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
5539
5542
if ($ xtype ) {
5540
5543
$ xtype = clone $ xtype ;
5541
5544
$ xtype ->setStorage ($ xaction );
@@ -5582,8 +5585,9 @@ private function newMFATransactions(
5582
5585
private function getTitleForTextMail (
5583
5586
PhabricatorApplicationTransaction $ xaction ) {
5584
5587
$ type = $ xaction ->getTransactionType ();
5588
+ $ object = $ this ->object ;
5585
5589
5586
- $ xtype = $ this ->getModularTransactionType ($ type );
5590
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
5587
5591
if ($ xtype ) {
5588
5592
$ xtype = clone $ xtype ;
5589
5593
$ xtype ->setStorage ($ xaction );
@@ -5599,8 +5603,9 @@ private function getTitleForTextMail(
5599
5603
private function getTitleForHTMLMail (
5600
5604
PhabricatorApplicationTransaction $ xaction ) {
5601
5605
$ type = $ xaction ->getTransactionType ();
5606
+ $ object = $ this ->object ;
5602
5607
5603
- $ xtype = $ this ->getModularTransactionType ($ type );
5608
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
5604
5609
if ($ xtype ) {
5605
5610
$ xtype = clone $ xtype ;
5606
5611
$ xtype ->setStorage ($ xaction );
@@ -5617,8 +5622,9 @@ private function getTitleForHTMLMail(
5617
5622
private function getBodyForTextMail (
5618
5623
PhabricatorApplicationTransaction $ xaction ) {
5619
5624
$ type = $ xaction ->getTransactionType ();
5625
+ $ object = $ this ->object ;
5620
5626
5621
- $ xtype = $ this ->getModularTransactionType ($ type );
5627
+ $ xtype = $ this ->getModularTransactionType ($ object , $ type );
5622
5628
if ($ xtype ) {
5623
5629
$ xtype = clone $ xtype ;
5624
5630
$ xtype ->setStorage ($ xaction );
0 commit comments