mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-21 03:08:40 +01:00
Pholio - fix a bug replacing multiple images
Summary: these transactions should //never// merge since they are always created for a 1:1 replacement. (ie any merging would be implicitly erroneous). Fixes T4081 Test Plan: made a mock with three images and replaced all three successfully. replaced image A with image B, did not save, replaced image B with image C, then saved and verified transaction correctly showed image A replaced with image C. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Maniphest Tasks: T4081 Differential Revision: https://secure.phabricator.com/D7536
This commit is contained in:
parent
7ffea0463e
commit
d0de4dab24
1 changed files with 4 additions and 1 deletions
|
@ -287,9 +287,12 @@ final class PholioMockEditor extends PhabricatorApplicationTransactionEditor {
|
|||
case PholioTransactionType::TYPE_DESCRIPTION:
|
||||
return $v;
|
||||
case PholioTransactionType::TYPE_IMAGE_REPLACE:
|
||||
if ($u->getNewValue() == $v->getOldValue()) {
|
||||
$u_img = $u->getNewValue();
|
||||
$v_img = $v->getNewValue();
|
||||
if ($u_img->getReplacesImagePHID() == $v_img->getReplacesImagePHID()) {
|
||||
return $v;
|
||||
}
|
||||
break;
|
||||
case PholioTransactionType::TYPE_IMAGE_FILE:
|
||||
return $this->mergePHIDOrEdgeTransactions($u, $v);
|
||||
case PholioTransactionType::TYPE_IMAGE_NAME:
|
||||
|
|
Loading…
Add table
Reference in a new issue