@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
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add participants ModularTransactions to Conpherence

Summary: Moves participants over to ModularTransactions, simplified a lot of the code. Fixes T12550

Test Plan:
Create a new room with just myself and myself + fake accounts.
Remove a person.
Remove myself.
Edit a room, topic.
Type some messages.
???
Profit

Reviewers: chad

Reviewed By: chad

Subscribers: Korvin

Maniphest Tasks: T12550

Differential Revision: https://secure.phabricator.com/D17685

authored by

Chad Little and committed by
epriestley
51485a1f b9868f4f

+158 -300
+2
src/__phutil_library_map__.php
··· 321 321 'ConpherenceThreadListView' => 'applications/conpherence/view/ConpherenceThreadListView.php', 322 322 'ConpherenceThreadMailReceiver' => 'applications/conpherence/mail/ConpherenceThreadMailReceiver.php', 323 323 'ConpherenceThreadMembersPolicyRule' => 'applications/conpherence/policyrule/ConpherenceThreadMembersPolicyRule.php', 324 + 'ConpherenceThreadParticipantsTransaction' => 'applications/conpherence/xaction/ConpherenceThreadParticipantsTransaction.php', 324 325 'ConpherenceThreadPictureTransaction' => 'applications/conpherence/xaction/ConpherenceThreadPictureTransaction.php', 325 326 'ConpherenceThreadQuery' => 'applications/conpherence/query/ConpherenceThreadQuery.php', 326 327 'ConpherenceThreadRemarkupRule' => 'applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php', ··· 5121 5122 'ConpherenceThreadListView' => 'AphrontView', 5122 5123 'ConpherenceThreadMailReceiver' => 'PhabricatorObjectMailReceiver', 5123 5124 'ConpherenceThreadMembersPolicyRule' => 'PhabricatorPolicyRule', 5125 + 'ConpherenceThreadParticipantsTransaction' => 'ConpherenceThreadTransactionType', 5124 5126 'ConpherenceThreadPictureTransaction' => 'ConpherenceThreadTransactionType', 5125 5127 'ConpherenceThreadQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 5126 5128 'ConpherenceThreadRemarkupRule' => 'PhabricatorObjectRemarkupRule',
+2 -1
src/applications/conpherence/__tests__/ConpherenceRoomTestCase.php
··· 107 107 108 108 $xactions = array(); 109 109 $xactions[] = id(new ConpherenceTransaction()) 110 - ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) 110 + ->setTransactionType( 111 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 111 112 ->setNewValue(array('+' => $participant_phids)); 112 113 $xactions[] = id(new ConpherenceTransaction()) 113 114 ->setTransactionType(
+4 -2
src/applications/conpherence/__tests__/ConpherenceTestCase.php
··· 9 9 10 10 $xactions = array( 11 11 id(new ConpherenceTransaction()) 12 - ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) 12 + ->setTransactionType( 13 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 13 14 ->setNewValue(array('+' => $participant_phids)), 14 15 ); 15 16 $editor = id(new ConpherenceEditor()) ··· 26 27 27 28 $xactions = array( 28 29 id(new ConpherenceTransaction()) 29 - ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) 30 + ->setTransactionType( 31 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 30 32 ->setNewValue(array('-' => $participant_phids)), 31 33 ); 32 34 $editor = id(new ConpherenceEditor())
+2 -2
src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php
··· 69 69 if ($add_participant_phids) { 70 70 $xactions[] = id(new ConpherenceTransaction()) 71 71 ->setTransactionType( 72 - ConpherenceTransaction::TYPE_PARTICIPANTS) 72 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 73 73 ->setNewValue(array('+' => $add_participant_phids)); 74 74 } 75 75 if ($remove_participant_phid) { ··· 78 78 } 79 79 $xactions[] = id(new ConpherenceTransaction()) 80 80 ->setTransactionType( 81 - ConpherenceTransaction::TYPE_PARTICIPANTS) 81 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 82 82 ->setNewValue(array('-' => array($remove_participant_phid))); 83 83 } 84 84 if ($title) {
+2 -1
src/applications/conpherence/controller/ConpherenceNewRoomController.php
··· 23 23 $participants[] = $user->getPHID(); 24 24 $participants = array_unique($participants); 25 25 $xactions[] = id(new ConpherenceTransaction()) 26 - ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) 26 + ->setTransactionType( 27 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 27 28 ->setNewValue(array('+' => $participants)); 28 29 $xactions[] = id(new ConpherenceTransaction()) 29 30 ->setTransactionType(ConpherenceThreadTopicTransaction::TRANSACTIONTYPE)
+3 -3
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 61 61 case ConpherenceUpdateActions::JOIN_ROOM: 62 62 $xactions[] = id(new ConpherenceTransaction()) 63 63 ->setTransactionType( 64 - ConpherenceTransaction::TYPE_PARTICIPANTS) 64 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 65 65 ->setNewValue(array('+' => array($user->getPHID()))); 66 66 $delete_draft = true; 67 67 $message = $request->getStr('text'); ··· 95 95 if (!empty($person_phids)) { 96 96 $xactions[] = id(new ConpherenceTransaction()) 97 97 ->setTransactionType( 98 - ConpherenceTransaction::TYPE_PARTICIPANTS) 98 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 99 99 ->setNewValue(array('+' => $person_phids)); 100 100 } 101 101 break; ··· 108 108 if ($person_phid) { 109 109 $xactions[] = id(new ConpherenceTransaction()) 110 110 ->setTransactionType( 111 - ConpherenceTransaction::TYPE_PARTICIPANTS) 111 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 112 112 ->setNewValue(array('-' => array($person_phid))); 113 113 $response_mode = 'go-home'; 114 114 }
+14 -210
src/applications/conpherence/editor/ConpherenceEditor.php
··· 37 37 if (!$errors) { 38 38 $xactions = array(); 39 39 $xactions[] = id(new ConpherenceTransaction()) 40 - ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) 40 + ->setTransactionType( 41 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 41 42 ->setNewValue(array('+' => $participant_phids)); 42 43 if ($title) { 43 44 $xactions[] = id(new ConpherenceTransaction()) ··· 87 88 public function getTransactionTypes() { 88 89 $types = parent::getTransactionTypes(); 89 90 90 - $types[] = ConpherenceTransaction::TYPE_PARTICIPANTS; 91 - 92 91 $types[] = PhabricatorTransactions::TYPE_COMMENT; 93 92 $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; 94 93 $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; ··· 98 97 99 98 public function getCreateObjectTitle($author, $object) { 100 99 return pht('%s created this room.', $author); 101 - } 102 - 103 - protected function getCustomTransactionOldValue( 104 - PhabricatorLiskDAO $object, 105 - PhabricatorApplicationTransaction $xaction) { 106 - 107 - switch ($xaction->getTransactionType()) { 108 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 109 - if ($this->getIsNewObject()) { 110 - return array(); 111 - } 112 - return $object->getParticipantPHIDs(); 113 - } 114 - } 115 - 116 - protected function getCustomTransactionNewValue( 117 - PhabricatorLiskDAO $object, 118 - PhabricatorApplicationTransaction $xaction) { 119 - 120 - switch ($xaction->getTransactionType()) { 121 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 122 - return $this->getPHIDTransactionNewValue($xaction); 123 - } 124 100 } 125 101 126 102 /** ··· 142 118 return $lock; 143 119 } 144 120 145 - /** 146 - * We need to apply initial effects IFF the conpherence is new. We must 147 - * save the conpherence first thing to make sure we have an id and a phid, as 148 - * well as create the initial set of participants so that we pass policy 149 - * checks. 150 - */ 151 - protected function shouldApplyInitialEffects( 152 - PhabricatorLiskDAO $object, 153 - array $xactions) { 154 - 155 - return $this->getIsNewObject(); 156 - } 157 - 158 - protected function applyInitialEffects( 159 - PhabricatorLiskDAO $object, 160 - array $xactions) { 161 - 162 - $object->save(); 163 - 164 - foreach ($xactions as $xaction) { 165 - switch ($xaction->getTransactionType()) { 166 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 167 - // Since this is a new ConpherenceThread, we have to create the 168 - // participation data asap to pass policy checks. For existing 169 - // ConpherenceThreads, the existing participation is correct 170 - // at this stage. Note that later in applyCustomExternalTransaction 171 - // this participation data will be updated. 172 - $participants = array(); 173 - $phids = $this->getPHIDTransactionNewValue($xaction, array()); 174 - foreach ($phids as $phid) { 175 - if ($phid == $this->getActor()->getPHID()) { 176 - $message_count = 1; 177 - } else { 178 - $message_count = 0; 179 - } 180 - $participants[$phid] = 181 - id(new ConpherenceParticipant()) 182 - ->setConpherencePHID($object->getPHID()) 183 - ->setParticipantPHID($phid) 184 - ->setSeenMessageCount($message_count) 185 - ->save(); 186 - $object->attachParticipants($participants); 187 - } 188 - break; 189 - } 190 - } 191 - } 192 - 193 - protected function applyCustomInternalTransaction( 194 - PhabricatorLiskDAO $object, 195 - PhabricatorApplicationTransaction $xaction) { 196 - 197 - switch ($xaction->getTransactionType()) { 198 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 199 - if (!$this->getIsNewObject()) {} 200 - break; 201 - } 202 - 203 - } 204 - 205 121 protected function applyBuiltinInternalTransaction( 206 122 PhabricatorLiskDAO $object, 207 123 PhabricatorApplicationTransaction $xaction) { ··· 215 131 return parent::applyBuiltinInternalTransaction($object, $xaction); 216 132 } 217 133 218 - protected function applyCustomExternalTransaction( 219 - PhabricatorLiskDAO $object, 220 - PhabricatorApplicationTransaction $xaction) { 221 - 222 - switch ($xaction->getTransactionType()) { 223 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 224 - if ($this->getIsNewObject()) { 225 - continue; 226 - } 227 - $participants = $object->getParticipants(); 228 - 229 - $old_map = array_fuse($xaction->getOldValue()); 230 - $new_map = array_fuse($xaction->getNewValue()); 231 - 232 - $remove = array_keys(array_diff_key($old_map, $new_map)); 233 - foreach ($remove as $phid) { 234 - $remove_participant = $participants[$phid]; 235 - $remove_participant->delete(); 236 - unset($participants[$phid]); 237 - } 238 - 239 - $add = array_keys(array_diff_key($new_map, $old_map)); 240 - foreach ($add as $phid) { 241 - if ($phid == $this->getActor()->getPHID()) { 242 - $message_count = $object->getMessageCount(); 243 - } else { 244 - $message_count = 0; 245 - } 246 - $participants[$phid] = 247 - id(new ConpherenceParticipant()) 248 - ->setConpherencePHID($object->getPHID()) 249 - ->setParticipantPHID($phid) 250 - ->setSeenMessageCount($message_count) 251 - ->save(); 252 - } 253 - $object->attachParticipants($participants); 254 - break; 255 - } 256 - } 257 134 258 135 protected function applyFinalEffects( 259 136 PhabricatorLiskDAO $object, 260 137 array $xactions) { 261 138 262 - if (!$xactions) { 263 - return $xactions; 139 + $acting_phid = $this->getActingAsPHID(); 140 + $participants = $object->getParticipants(); 141 + foreach ($participants as $participant) { 142 + if ($participant->getParticipantPHID() == $acting_phid) { 143 + $participant->markUpToDate($object); 144 + } 264 145 } 265 146 266 - $message_count = 0; 267 - foreach ($xactions as $xaction) { 268 - switch ($xaction->getTransactionType()) { 269 - case PhabricatorTransactions::TYPE_COMMENT: 270 - $message_count++; 271 - 272 - // update everyone's participation status on a message -only- 273 - $xaction_phid = $xaction->getPHID(); 274 - $participants = $object->getParticipants(); 275 - $user = $this->getActor(); 276 - $time = time(); 277 - foreach ($participants as $phid => $participant) { 278 - if ($phid != $user->getPHID()) { 279 - if ($participant->isUpToDate($object)) { 280 - $participant->setSeenMessageCount( 281 - $object->getMessageCount() - $message_count); 282 - } 283 - } else { 284 - $participant->setSeenMessageCount($object->getMessageCount()); 285 - } 286 - $participant->save(); 287 - } 288 - 289 - PhabricatorUserCache::clearCaches( 290 - PhabricatorUserMessageCountCacheType::KEY_COUNT, 291 - array_keys($participants)); 292 - 293 - break; 294 - } 147 + if ($participants) { 148 + PhabricatorUserCache::clearCaches( 149 + PhabricatorUserMessageCountCacheType::KEY_COUNT, 150 + array_keys($participants)); 295 151 } 296 152 297 153 if ($xactions) { ··· 315 171 parent::requireCapabilities($object, $xaction); 316 172 317 173 switch ($xaction->getTransactionType()) { 318 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 174 + case ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE: 319 175 $old_map = array_fuse($xaction->getOldValue()); 320 176 $new_map = array_fuse($xaction->getNewValue()); 321 177 ··· 339 195 $object, 340 196 PhabricatorPolicyCapability::CAN_EDIT); 341 197 } 342 - 343 198 break; 199 + 344 200 case ConpherenceThreadTitleTransaction::TRANSACTIONTYPE: 345 201 case ConpherenceThreadTopicTransaction::TRANSACTIONTYPE: 346 202 PhabricatorPolicyFilter::requireCapability( ··· 349 205 PhabricatorPolicyCapability::CAN_EDIT); 350 206 break; 351 207 } 352 - } 353 - 354 - protected function mergeTransactions( 355 - PhabricatorApplicationTransaction $u, 356 - PhabricatorApplicationTransaction $v) { 357 - 358 - $type = $u->getTransactionType(); 359 - switch ($type) { 360 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 361 - return $this->mergePHIDOrEdgeTransactions($u, $v); 362 - } 363 - 364 - return parent::mergeTransactions($u, $v); 365 208 } 366 209 367 210 protected function shouldSendMail( ··· 466 309 return true; 467 310 } 468 311 469 - protected function validateTransaction( 470 - PhabricatorLiskDAO $object, 471 - $type, 472 - array $xactions) { 473 - 474 - $errors = parent::validateTransaction($object, $type, $xactions); 475 - 476 - switch ($type) { 477 - case ConpherenceTransaction::TYPE_PARTICIPANTS: 478 - foreach ($xactions as $xaction) { 479 - $new_phids = $this->getPHIDTransactionNewValue($xaction, array()); 480 - $old_phids = nonempty($object->getParticipantPHIDs(), array()); 481 - $phids = array_diff($new_phids, $old_phids); 482 - 483 - if (!$phids) { 484 - continue; 485 - } 486 - 487 - $users = id(new PhabricatorPeopleQuery()) 488 - ->setViewer($this->requireActor()) 489 - ->withPHIDs($phids) 490 - ->execute(); 491 - $users = mpull($users, null, 'getPHID'); 492 - foreach ($phids as $phid) { 493 - if (isset($users[$phid])) { 494 - continue; 495 - } 496 - $errors[] = new PhabricatorApplicationTransactionValidationError( 497 - $type, 498 - pht('Invalid'), 499 - pht('New room participant "%s" is not a valid user.', $phid), 500 - $xaction); 501 - } 502 - } 503 - break; 504 - } 505 - 506 - return $errors; 507 - } 508 312 }
+2 -1
src/applications/conpherence/mail/ConpherenceReplyHandler.php
··· 55 55 $xactions = array(); 56 56 if ($this->getMailAddedParticipantPHIDs()) { 57 57 $xactions[] = id(new ConpherenceTransaction()) 58 - ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) 58 + ->setTransactionType( 59 + ConpherenceThreadParticipantsTransaction::TRANSACTIONTYPE) 59 60 ->setNewValue(array('+' => $this->getMailAddedParticipantPHIDs())); 60 61 } 61 62
-79
src/applications/conpherence/storage/ConpherenceTransaction.php
··· 3 3 final class ConpherenceTransaction 4 4 extends PhabricatorModularTransaction { 5 5 6 - const TYPE_PARTICIPANTS = 'participants'; 7 - 8 6 public function getApplicationName() { 9 7 return 'conpherence'; 10 8 } ··· 21 19 return 'ConpherenceThreadTransactionType'; 22 20 } 23 21 24 - public function getNoEffectDescription() { 25 - switch ($this->getTransactionType()) { 26 - case self::TYPE_PARTICIPANTS: 27 - return pht( 28 - 'You can not add a participant who has already been added.'); 29 - break; 30 - } 31 - 32 - return parent::getNoEffectDescription(); 33 - } 34 - 35 - public function shouldHide() { 36 - $old = $this->getOldValue(); 37 - 38 - switch ($this->getTransactionType()) { 39 - case self::TYPE_PARTICIPANTS: 40 - return ($old === null); 41 - } 42 - 43 - return parent::shouldHide(); 44 - } 45 - 46 - public function getTitle() { 47 - $author_phid = $this->getAuthorPHID(); 48 - 49 - $old = $this->getOldValue(); 50 - $new = $this->getNewValue(); 51 - 52 - switch ($this->getTransactionType()) { 53 - case self::TYPE_PARTICIPANTS: 54 - $add = array_diff($new, $old); 55 - $rem = array_diff($old, $new); 56 - 57 - if ($add && $rem) { 58 - $title = pht( 59 - '%s edited participant(s), added %d: %s; removed %d: %s.', 60 - $this->renderHandleLink($author_phid), 61 - count($add), 62 - $this->renderHandleList($add), 63 - count($rem), 64 - $this->renderHandleList($rem)); 65 - } else if ($add) { 66 - $title = pht( 67 - '%s added %d participant(s): %s.', 68 - $this->renderHandleLink($author_phid), 69 - count($add), 70 - $this->renderHandleList($add)); 71 - } else { 72 - $title = pht( 73 - '%s removed %d participant(s): %s.', 74 - $this->renderHandleLink($author_phid), 75 - count($rem), 76 - $this->renderHandleList($rem)); 77 - } 78 - return $title; 79 - break; 80 - } 81 - 82 - return parent::getTitle(); 83 - } 84 - 85 - public function getRequiredHandlePHIDs() { 86 - $phids = parent::getRequiredHandlePHIDs(); 87 - 88 - $old = $this->getOldValue(); 89 - $new = $this->getNewValue(); 90 - 91 - $phids[] = $this->getAuthorPHID(); 92 - switch ($this->getTransactionType()) { 93 - case self::TYPE_PARTICIPANTS: 94 - $phids = array_merge($phids, $this->getOldValue()); 95 - $phids = array_merge($phids, $this->getNewValue()); 96 - break; 97 - } 98 - 99 - return $phids; 100 - } 101 22 }
+117
src/applications/conpherence/xaction/ConpherenceThreadParticipantsTransaction.php
··· 1 + <?php 2 + 3 + final class ConpherenceThreadParticipantsTransaction 4 + extends ConpherenceThreadTransactionType { 5 + 6 + const TRANSACTIONTYPE = 'participants'; 7 + 8 + public function generateOldValue($object) { 9 + return $object->getParticipantPHIDs(); 10 + } 11 + 12 + public function generateNewValue($object, $value) { 13 + $old = $this->generateOldValue($object); 14 + return $this->getPHIDList($old, $value); 15 + } 16 + 17 + public function applyExternalEffects($object, $value) { 18 + $participants = $object->getParticipants(); 19 + 20 + $old = array_keys($participants); 21 + $new = $value; 22 + 23 + $add_map = array_fuse(array_diff($new, $old)); 24 + $rem_map = array_fuse(array_diff($old, $new)); 25 + 26 + foreach ($rem_map as $phid) { 27 + $remove_participant = $participants[$phid]; 28 + $remove_participant->delete(); 29 + unset($participants[$phid]); 30 + } 31 + 32 + foreach ($add_map as $phid) { 33 + if (isset($participants[$phid])) { 34 + continue; 35 + } 36 + 37 + $participants[$phid] = id(new ConpherenceParticipant()) 38 + ->setConpherencePHID($object->getPHID()) 39 + ->setParticipantPHID($phid) 40 + ->setSeenMessageCount(0) 41 + ->save(); 42 + } 43 + 44 + $object->attachParticipants($participants); 45 + } 46 + 47 + public function getTitle() { 48 + $old = $this->getOldValue(); 49 + $new = $this->getNewValue(); 50 + 51 + $add = array_diff($new, $old); 52 + $rem = array_diff($old, $new); 53 + 54 + $author_phid = $this->getAuthorPHID(); 55 + 56 + if ($add && $rem) { 57 + return pht( 58 + '%s edited participant(s), added %d: %s; removed %d: %s.', 59 + $this->renderAuthor(), 60 + count($add), 61 + $this->renderHandleList($add), 62 + count($rem), 63 + $this->renderHandleList($rem)); 64 + } else if ((in_array($author_phid, $add)) && (count($add) == 1)) { 65 + return pht( 66 + '%s joined the room.', 67 + $this->renderAuthor()); 68 + } else if ((in_array($author_phid, $rem)) && (count($rem) == 1)) { 69 + return pht( 70 + '%s left the room.', 71 + $this->renderAuthor()); 72 + } else if ($add) { 73 + return pht( 74 + '%s added %d participant(s): %s.', 75 + $this->renderAuthor(), 76 + count($add), 77 + $this->renderHandleList($add)); 78 + } else { 79 + return pht( 80 + '%s removed %d participant(s): %s.', 81 + $this->renderAuthor(), 82 + count($rem), 83 + $this->renderHandleList($rem)); 84 + } 85 + } 86 + 87 + public function validateTransactions($object, array $xactions) { 88 + $errors = array(); 89 + 90 + foreach ($xactions as $xaction) { 91 + $old = $object->getParticipantPHIDs(); 92 + 93 + $new = $xaction->getNewValue(); 94 + $new = $this->getPHIDList($old, $new); 95 + 96 + $add_map = array_fuse(array_diff($new, $old)); 97 + $rem_map = array_fuse(array_diff($old, $new)); 98 + 99 + foreach ($add_map as $user_phid) { 100 + $user = id(new PhabricatorPeopleQuery()) 101 + ->setViewer($this->getActor()) 102 + ->withPHIDs(array($user_phid)) 103 + ->executeOne(); 104 + if (!$user) { 105 + $errors[] = $this->newInvalidError( 106 + pht( 107 + 'Participant PHID "%s" is not a valid user PHID.', 108 + $user_phid)); 109 + continue; 110 + } 111 + } 112 + } 113 + 114 + return $errors; 115 + } 116 + 117 + }
+4 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 1801 1801 $old = array_fuse($xaction->getOldValue()); 1802 1802 } 1803 1803 1804 - $new = $xaction->getNewValue(); 1804 + return $this->getPHIDList($old, $xaction->getNewValue()); 1805 + } 1806 + 1807 + public function getPHIDList(array $old, array $new) { 1805 1808 $new_add = idx($new, '+', array()); 1806 1809 unset($new['+']); 1807 1810 $new_rem = idx($new, '-', array());
+6
src/applications/transactions/storage/PhabricatorModularTransactionType.php
··· 309 309 return $this->getStorage()->getIsCreateTransaction(); 310 310 } 311 311 312 + final protected function getPHIDList(array $old, array $new) { 313 + $editor = $this->getEditor(); 314 + 315 + return $editor->getPHIDList($old, $new); 316 + } 317 + 312 318 }