Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14068399
D9551.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.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
Wed, Nov 20, 9:42 PM (22 h, 1 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716513
Default Alt Text
D9551.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