Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProjectTrigger.php
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | public function getTriggerRules($viewer = null) { | ||||
return $this->triggerRules; | return $this->triggerRules; | ||||
} | } | ||||
public static function newTriggerRulesFromRuleSpecifications( | public static function newTriggerRulesFromRuleSpecifications( | ||||
array $list, | array $list, | ||||
$allow_invalid, | $allow_invalid, | ||||
PhabricatorUser $viewer) { | PhabricatorUser $viewer) { | ||||
// NOTE: With "$allow_invalid" set, we're trying to preserve the database | // NOTE: With "$allow_invalid" set, we're trying to preserve the database | ||||
// state in the rule structure, even if it includes rule types we don't | // state in the rule structure, even if it includes rule types we don't | ||||
// ha ve implementations for, or rules with invalid rule values. | // have implementations for, or rules with invalid rule values. | ||||
// If an administrator adds or removes extensions which add rules, or | // If an administrator adds or removes extensions which add rules, or | ||||
// an upgrade affects rule validity, existing rules may become invalid. | // an upgrade affects rule validity, existing rules may become invalid. | ||||
// When they do, we still want the UI to reflect the ruleset state | // When they do, we still want the UI to reflect the ruleset state | ||||
// accurately and "Edit" + "Save" shouldn't destroy data unless the | // accurately and "Edit" + "Save" shouldn't destroy data unless the | ||||
// user explicitly modifies the ruleset. | // user explicitly modifies the ruleset. | ||||
// In this mode, when we run into rules which are structured correctly but | // In this mode, when we run into rules which are structured correctly but | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |