Page MenuHomePhabricator

D9551.id22894.diff
No OneTemporary

D9551.id22894.diff

diff --git a/src/applications/pholio/storage/PholioMock.php b/src/applications/pholio/storage/PholioMock.php
--- a/src/applications/pholio/storage/PholioMock.php
+++ b/src/applications/pholio/storage/PholioMock.php
@@ -8,7 +8,8 @@
PhabricatorTokenReceiverInterface,
PhabricatorFlaggableInterface,
PhabricatorApplicationTransactionInterface,
- PhabricatorProjectInterface {
+ PhabricatorProjectInterface,
+ PhabricatorDestructableInterface {
const MARKUP_FIELD_DESCRIPTION = 'markup:description';
@@ -256,4 +257,23 @@
);
}
+
+/* -( PhabricatorDestructableInterface )----------------------------------- */
+
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ $images = id(new PholioImage())->loadAllWhere(
+ 'mockID = %d',
+ $this->getID());
+ foreach ($images as $image) {
+ $image->delete();
+ }
+
+ $this->delete();
+ $this->saveTransaction();
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Oct 16 2024, 7:08 AM (4 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716513
Default Alt Text
D9551.id22894.diff (1020 B)

Event Timeline