protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v) { $type = $u->getTransactionType(); switch ($type) { case PhabricatorConfigTransaction::TYPE_EDIT: return $v; } return parent::mergeTransactions($u, $v); }
protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v) { $type = $u->getTransactionType(); switch ($type) { case PhabricatorAuthProviderConfigTransaction::TYPE_ENABLE: case PhabricatorAuthProviderConfigTransaction::TYPE_LOGIN: case PhabricatorAuthProviderConfigTransaction::TYPE_REGISTRATION: case PhabricatorAuthProviderConfigTransaction::TYPE_LINK: case PhabricatorAuthProviderConfigTransaction::TYPE_UNLINK: case PhabricatorAuthProviderConfigTransaction::TYPE_TRUST_EMAILS: case PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN: // For these types, last transaction wins. return $v; } return parent::mergeTransactions($u, $v); }
protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v) { $type = $u->getTransactionType(); switch ($type) { case PholioTransactionType::TYPE_NAME: case PholioTransactionType::TYPE_DESCRIPTION: case PholioTransactionType::TYPE_STATUS: return $v; case PholioTransactionType::TYPE_IMAGE_REPLACE: $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: case PholioTransactionType::TYPE_IMAGE_DESCRIPTION: case PholioTransactionType::TYPE_IMAGE_SEQUENCE: $raw_new_value_u = $u->getNewValue(); $raw_new_value_v = $v->getNewValue(); $phid_u = key($raw_new_value_u); $phid_v = key($raw_new_value_v); if ($phid_u == $phid_v) { return $v; } break; } return parent::mergeTransactions($u, $v); }
protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v) { $type = $u->getTransactionType(); switch ($type) { case ConpherenceTransaction::TYPE_TITLE: return $v; case ConpherenceTransaction::TYPE_FILES: case ConpherenceTransaction::TYPE_PARTICIPANTS: return $this->mergePHIDOrEdgeTransactions($u, $v); } return parent::mergeTransactions($u, $v); }
protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v) { $type = $u->getTransactionType(); switch ($type) { case LegalpadTransaction::TYPE_TITLE: case LegalpadTransaction::TYPE_TEXT: case LegalpadTransaction::TYPE_SIGNATURE_TYPE: case LegalpadTransaction::TYPE_PREAMBLE: case LegalpadTransaction::TYPE_REQUIRE_SIGNATURE: return $v; } return parent::mergeTransactions($u, $v); }
protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v) { $type = $u->getTransactionType(); switch ($type) { case PhabricatorMacroTransaction::TYPE_NAME: case PhabricatorMacroTransaction::TYPE_DISABLED: case PhabricatorMacroTransaction::TYPE_FILE: case PhabricatorMacroTransaction::TYPE_AUDIO: case PhabricatorMacroTransaction::TYPE_AUDIO_BEHAVIOR: return $v; } return parent::mergeTransactions($u, $v); }
protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v) { $type = $u->getTransactionType(); switch ($type) { } return parent::mergeTransactions($u, $v); }