protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorProjectTransaction::TYPE_NAME:
         case PhabricatorProjectTransaction::TYPE_STATUS:
         case PhabricatorProjectTransaction::TYPE_IMAGE:
         case PhabricatorProjectTransaction::TYPE_ICON:
         case PhabricatorProjectTransaction::TYPE_COLOR:
         case PhabricatorProjectTransaction::TYPE_LOCKED:
         case PhabricatorProjectTransaction::TYPE_PARENT:
             return $xaction->getNewValue();
         case PhabricatorProjectTransaction::TYPE_SLUGS:
             return $this->normalizeSlugs($xaction->getNewValue());
         case PhabricatorProjectTransaction::TYPE_MILESTONE:
             $current = queryfx_one($object->establishConnection('w'), 'SELECT MAX(milestoneNumber) n
         FROM %T
         WHERE parentProjectPHID = %s', $object->getTableName(), $object->getParentProject()->getPHID());
             if (!$current) {
                 $number = 1;
             } else {
                 $number = (int) $current['n'] + 1;
             }
             return $number;
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceRequestorTransaction::TYPE_PROPERTY:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
Example #3
0
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case FundBackerTransaction::TYPE_STATUS:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacNetworkTransaction::TYPE_NAME:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
Example #5
0
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacTransaction::TYPE_PROPERTY_UPDATE:
         case AlmanacTransaction::TYPE_PROPERTY_REMOVE:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhluxTransaction::TYPE_EDIT_KEY:
         case PhluxTransaction::TYPE_EDIT_VALUE:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorDashboardTransaction::TYPE_NAME:
         case PhabricatorDashboardTransaction::TYPE_LAYOUT_MODE:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorMetaMTAApplicationEmailTransaction::TYPE_ADDRESS:
         case PhabricatorMetaMTAApplicationEmailTransaction::TYPE_CONFIG:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case DifferentialDiffTransaction::TYPE_DIFF_CREATE:
             $this->diffDataDict = $xaction->getNewValue();
             return true;
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceSourceTransaction::TYPE_NAME:
         case NuanceSourceTransaction::TYPE_DEFAULT_QUEUE:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneMerchantTransaction::TYPE_NAME:
         case PhortuneMerchantTransaction::TYPE_DESCRIPTION:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
Example #12
0
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceItemTransaction::TYPE_REQUESTOR:
         case NuanceItemTransaction::TYPE_SOURCE:
         case NuanceItemTransaction::TYPE_OWNER:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case DrydockBlueprintTransaction::TYPE_NAME:
             return $xaction->getNewValue();
         case DrydockBlueprintTransaction::TYPE_DISABLED:
             return (int) $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneProductTransaction::TYPE_NAME:
         case PhortuneProductTransaction::TYPE_TYPE:
         case PhortuneProductTransaction::TYPE_PRICE:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HarbormasterBuildPlanTransaction::TYPE_NAME:
             return $xaction->getNewValue();
         case HarbormasterBuildPlanTransaction::TYPE_STATUS:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorAuditActionConstants::ACTION:
         case PhabricatorAuditActionConstants::INLINE:
         case PhabricatorAuditActionConstants::ADD_AUDITORS:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HarbormasterBuildTransaction::TYPE_CREATE:
             return true;
         case HarbormasterBuildTransaction::TYPE_COMMAND:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case FundInitiativeTransaction::TYPE_NAME:
         case FundInitiativeTransaction::TYPE_DESCRIPTION:
         case FundInitiativeTransaction::TYPE_STATUS:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortunePaymentProviderConfigTransaction::TYPE_CREATE:
         case PhortunePaymentProviderConfigTransaction::TYPE_PROPERTY:
             return $xaction->getNewValue();
         case PhortunePaymentProviderConfigTransaction::TYPE_ENABLE:
             return (int) $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HarbormasterBuildStepTransaction::TYPE_CREATE:
             return true;
         case HarbormasterBuildStepTransaction::TYPE_NAME:
         case HarbormasterBuildStepTransaction::TYPE_DEPENDS_ON:
         case HarbormasterBuildStepTransaction::TYPE_DESCRIPTION:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorCountdownTransaction::TYPE_TITLE:
             return $xaction->getNewValue();
         case PhabricatorCountdownTransaction::TYPE_DESCRIPTION:
             return $xaction->getNewValue();
         case PhabricatorCountdownTransaction::TYPE_EPOCH:
             return $xaction->getNewValue()->getEpoch();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorBadgesTransaction::TYPE_NAME:
         case PhabricatorBadgesTransaction::TYPE_FLAVOR:
         case PhabricatorBadgesTransaction::TYPE_DESCRIPTION:
         case PhabricatorBadgesTransaction::TYPE_ICON:
         case PhabricatorBadgesTransaction::TYPE_STATUS:
         case PhabricatorBadgesTransaction::TYPE_QUALITY:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneMerchantTransaction::TYPE_NAME:
         case PhortuneMerchantTransaction::TYPE_DESCRIPTION:
         case PhortuneMerchantTransaction::TYPE_CONTACTINFO:
         case PhortuneMerchantTransaction::TYPE_INVOICEEMAIL:
         case PhortuneMerchantTransaction::TYPE_INVOICEFOOTER:
         case PhortuneMerchantTransaction::TYPE_PICTURE:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorProjectTransaction::TYPE_NAME:
         case PhabricatorProjectTransaction::TYPE_SLUGS:
         case PhabricatorProjectTransaction::TYPE_STATUS:
         case PhabricatorProjectTransaction::TYPE_IMAGE:
         case PhabricatorProjectTransaction::TYPE_ICON:
         case PhabricatorProjectTransaction::TYPE_COLOR:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $actor = $this->getActor();
     $setting_key = $xaction->getMetadataValue(PhabricatorUserPreferencesTransaction::PROPERTY_SETTING);
     $settings = PhabricatorSetting::getAllEnabledSettings($actor);
     $setting = $settings[$setting_key];
     switch ($xaction->getTransactionType()) {
         case PhabricatorUserPreferencesTransaction::TYPE_SETTING:
             $value = $xaction->getNewValue();
             $value = $setting->getTransactionNewValue($value);
             return $value;
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
Example #26
0
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneCartTransaction::TYPE_CREATED:
         case PhortuneCartTransaction::TYPE_PURCHASED:
         case PhortuneCartTransaction::TYPE_HOLD:
         case PhortuneCartTransaction::TYPE_REVIEW:
         case PhortuneCartTransaction::TYPE_CANCEL:
         case PhortuneCartTransaction::TYPE_REFUND:
         case PhortuneCartTransaction::TYPE_INVOICED:
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorProjectColumnTransaction::TYPE_NAME:
         case PhabricatorProjectColumnTransaction::TYPE_STATUS:
             return $xaction->getNewValue();
         case PhabricatorProjectColumnTransaction::TYPE_LIMIT:
             if ($xaction->getNewValue()) {
                 return (int) $xaction->getNewValue();
             }
             return null;
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorRepositoryURITransaction::TYPE_URI:
         case PhabricatorRepositoryURITransaction::TYPE_IO:
         case PhabricatorRepositoryURITransaction::TYPE_DISPLAY:
         case PhabricatorRepositoryURITransaction::TYPE_REPOSITORY:
         case PhabricatorRepositoryURITransaction::TYPE_CREDENTIAL:
             return $xaction->getNewValue();
         case PhabricatorRepositoryURITransaction::TYPE_DISABLE:
             return (int) $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorSpacesNamespaceTransaction::TYPE_NAME:
         case PhabricatorSpacesNamespaceTransaction::TYPE_DESCRIPTION:
         case PhabricatorTransactions::TYPE_VIEW_POLICY:
         case PhabricatorTransactions::TYPE_EDIT_POLICY:
             return $xaction->getNewValue();
         case PhabricatorSpacesNamespaceTransaction::TYPE_ARCHIVE:
             return $xaction->getNewValue() ? 1 : 0;
         case PhabricatorSpacesNamespaceTransaction::TYPE_DEFAULT:
             return $xaction->getNewValue() ? 1 : null;
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }
 protected function getCustomTransactionNewValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorPhurlURLTransaction::TYPE_NAME:
         case PhabricatorPhurlURLTransaction::TYPE_URL:
         case PhabricatorPhurlURLTransaction::TYPE_DESCRIPTION:
             return $xaction->getNewValue();
         case PhabricatorPhurlURLTransaction::TYPE_ALIAS:
             if (!strlen($xaction->getNewValue())) {
                 return null;
             }
             return $xaction->getNewValue();
     }
     return parent::getCustomTransactionNewValue($object, $xaction);
 }