1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Allow herald rules to be deleted with ./bin/remove destroy.

Summary: Fixes T5286. Allow herald rules to be deleted using the `./bin/remove destroy` workflow.

Test Plan: Created a herald rule. Deleted it with `./bin/remove destroy`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5286

Differential Revision: https://secure.phabricator.com/D9416
This commit is contained in:
Joshua Spence 2014-06-07 11:19:04 -07:00 committed by epriestley
parent d06679a021
commit 0a534d1d1f

View file

@ -3,7 +3,8 @@
final class HeraldRule extends HeraldDAO
implements
PhabricatorFlaggableInterface,
PhabricatorPolicyInterface {
PhabricatorPolicyInterface,
PhabricatorDestructableInterface {
const TABLE_RULE_APPLIED = 'herald_ruleapplied';
@ -250,4 +251,15 @@ final class HeraldRule extends HeraldDAO
return null;
}
/* -( PhabricatorDestructableInterface )----------------------------------- */
public function destroyObjectPermanently(
PhabricatorDestructionEngine $engine) {
$this->openTransaction();
$this->delete();
$this->saveTransaction();
}
}