Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialChangeset.php
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | $this->openTransaction(); | ||||
| } | } | ||||
| $this->saveTransaction(); | $this->saveTransaction(); | ||||
| return $ret; | return $ret; | ||||
| } | } | ||||
| public function delete() { | public function delete() { | ||||
| $this->openTransaction(); | $this->openTransaction(); | ||||
| $legacy_hunks = id(new DifferentialLegacyHunk())->loadAllWhere( | |||||
| 'changesetID = %d', | |||||
| $this->getID()); | |||||
| foreach ($legacy_hunks as $legacy_hunk) { | |||||
| $legacy_hunk->delete(); | |||||
| } | |||||
| $modern_hunks = id(new DifferentialModernHunk())->loadAllWhere( | $modern_hunks = id(new DifferentialModernHunk())->loadAllWhere( | ||||
| 'changesetID = %d', | 'changesetID = %d', | ||||
| $this->getID()); | $this->getID()); | ||||
| foreach ($modern_hunks as $modern_hunk) { | foreach ($modern_hunks as $modern_hunk) { | ||||
| $modern_hunk->delete(); | $modern_hunk->delete(); | ||||
| } | } | ||||
| $this->unsavedHunks = array(); | $this->unsavedHunks = array(); | ||||
| ▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines | |||||