Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/controller/HeraldRuleController.php
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$adapter = HeraldAdapter::getAdapterForContentType($rule->getContentType()); | $adapter = HeraldAdapter::getAdapterForContentType($rule->getContentType()); | ||||
$local_version = id(new HeraldRule())->getConfigVersion(); | $local_version = id(new HeraldRule())->getConfigVersion(); | ||||
if ($rule->getConfigVersion() > $local_version) { | if ($rule->getConfigVersion() > $local_version) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'This rule was created with a newer version of Herald. You can not '. | 'This rule was created with a newer version of Herald. You can not '. | ||||
'view or edit it in this older version. Upgrade your Phabricator '. | 'view or edit it in this older version. Upgrade your software.')); | ||||
'deployment.')); | |||||
} | } | ||||
// Upgrade rule version to our version, since we might add newly-defined | // Upgrade rule version to our version, since we might add newly-defined | ||||
// conditions, etc. | // conditions, etc. | ||||
$rule->setConfigVersion($local_version); | $rule->setConfigVersion($local_version); | ||||
$rule_conditions = $rule->loadConditions(); | $rule_conditions = $rule->loadConditions(); | ||||
$rule_actions = $rule->loadActions(); | $rule_actions = $rule->loadActions(); | ||||
▲ Show 20 Lines • Show All 620 Lines • Show Last 20 Lines |