Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13961938
D9551.id22894.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1020 B
Referenced Files
None
Subscribers
None
D9551.id22894.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9551: Allow Pholio mocks to be destroyed with `bin/remove`
Attached
Detach File
Event Timeline
Log In to Comment