1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +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:
Joshua Spence 2015-06-02 22:12:45 +10:00
parent 95551a1a5a
commit 2d15c3c062

View file

@ -352,17 +352,7 @@ final class ManiphestTask extends ManiphestDAO
PhabricatorDestructionEngine $engine) {
$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();
}