Page MenuHomePhabricator

D9551.diff
No OneTemporary

D9551.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
Sun, Nov 10, 11:07 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716513
Default Alt Text
D9551.diff (1020 B)

Event Timeline