Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialDiff.php
Show First 20 Lines • Show All 721 Lines • ▼ Show 20 Lines | /* -( PhabricatorDestructibleInterface )----------------------------------- */ | ||||
public function destroyObjectPermanently( | public function destroyObjectPermanently( | ||||
PhabricatorDestructionEngine $engine) { | PhabricatorDestructionEngine $engine) { | ||||
$this->openTransaction(); | $this->openTransaction(); | ||||
$this->delete(); | $this->delete(); | ||||
foreach ($this->loadChangesets() as $changeset) { | foreach ($this->loadChangesets() as $changeset) { | ||||
$changeset->delete(); | $engine->destroyObject($changeset); | ||||
} | } | ||||
$properties = id(new DifferentialDiffProperty())->loadAllWhere( | $properties = id(new DifferentialDiffProperty())->loadAllWhere( | ||||
'diffID = %d', | 'diffID = %d', | ||||
$this->getID()); | $this->getID()); | ||||
foreach ($properties as $prop) { | foreach ($properties as $prop) { | ||||
$prop->delete(); | $prop->delete(); | ||||
} | } | ||||
$this->saveTransaction(); | $this->saveTransaction(); | ||||
} | } | ||||
} | } |