Differential D20329 Diff 48622 src/applications/project/xaction/trigger/PhabricatorProjectTriggerRulesetTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/xaction/trigger/PhabricatorProjectTriggerRulesetTransaction.php
Show All 22 Lines | public function validateTransactions($object, array $xactions) { | ||||
$errors = array(); | $errors = array(); | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$ruleset = $xaction->getNewValue(); | $ruleset = $xaction->getNewValue(); | ||||
try { | try { | ||||
PhabricatorProjectTrigger::newTriggerRulesFromRuleSpecifications( | PhabricatorProjectTrigger::newTriggerRulesFromRuleSpecifications( | ||||
$ruleset, | $ruleset, | ||||
$allow_invalid = false); | $allow_invalid = false, | ||||
$xaction->getViewer()); | |||||
} catch (PhabricatorProjectTriggerCorruptionException $ex) { | } catch (PhabricatorProjectTriggerCorruptionException $ex) { | ||||
$errors[] = $this->newInvalidError( | $errors[] = $this->newInvalidError( | ||||
pht( | pht( | ||||
'Ruleset specification is not valid. %s', | 'Ruleset specification is not valid. %s', | ||||
$ex->getMessage()), | $ex->getMessage()), | ||||
$xaction); | $xaction); | ||||
continue; | continue; | ||||
} | } | ||||
Show All 26 Lines |