mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Tidy up ManiphestTask destruction
Summary: Now that `ManiphestTask` implements `PhabricatorApplicationTransactionInterface`, the transaction removal happens automatically. Test Plan: Used `./bin/remove destroy` to delete a `ManiphestTask` and saw related transactions removed as well. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D13110
This commit is contained in:
parent
95551a1a5a
commit
2d15c3c062
1 changed files with 1 additions and 11 deletions
|
@ -352,16 +352,6 @@ final class ManiphestTask extends ManiphestDAO
|
||||||
PhabricatorDestructionEngine $engine) {
|
PhabricatorDestructionEngine $engine) {
|
||||||
|
|
||||||
$this->openTransaction();
|
$this->openTransaction();
|
||||||
|
|
||||||
// TODO: Once this implements PhabricatorTransactionInterface, this
|
|
||||||
// will be handled automatically and can be removed.
|
|
||||||
$xactions = id(new ManiphestTransaction())->loadAllWhere(
|
|
||||||
'objectPHID = %s',
|
|
||||||
$this->getPHID());
|
|
||||||
foreach ($xactions as $xaction) {
|
|
||||||
$engine->destroyObject($xaction);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->delete();
|
$this->delete();
|
||||||
$this->saveTransaction();
|
$this->saveTransaction();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue