Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | $diffs = id(new DifferentialDiffQuery()) | ||||
$inlines = id(new DifferentialInlineCommentQuery()) | $inlines = id(new DifferentialInlineCommentQuery()) | ||||
->withRevisionIDs(array($this->getID())) | ->withRevisionIDs(array($this->getID())) | ||||
->execute(); | ->execute(); | ||||
foreach ($inlines as $inline) { | foreach ($inlines as $inline) { | ||||
$inline->delete(); | $inline->delete(); | ||||
} | } | ||||
$fields = id(new DifferentialAuxiliaryField())->loadAllWhere( | |||||
'revisionPHID = %s', | |||||
$this->getPHID()); | |||||
foreach ($fields as $field) { | |||||
$field->delete(); | |||||
} | |||||
// we have to do paths a little differentally as they do not have | // we have to do paths a little differentally as they do not have | ||||
// an id or phid column for delete() to act on | // an id or phid column for delete() to act on | ||||
$dummy_path = new DifferentialAffectedPath(); | $dummy_path = new DifferentialAffectedPath(); | ||||
queryfx( | queryfx( | ||||
$conn_w, | $conn_w, | ||||
'DELETE FROM %T WHERE revisionID = %d', | 'DELETE FROM %T WHERE revisionID = %d', | ||||
$dummy_path->getTableName(), | $dummy_path->getTableName(), | ||||
$this->getID()); | $this->getID()); | ||||
▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines |