Page MenuHomePhabricator

D9976.diff
No OneTemporary

D9976.diff

diff --git a/src/applications/phriction/storage/PhrictionDocument.php b/src/applications/phriction/storage/PhrictionDocument.php
--- a/src/applications/phriction/storage/PhrictionDocument.php
+++ b/src/applications/phriction/storage/PhrictionDocument.php
@@ -5,7 +5,8 @@
PhabricatorPolicyInterface,
PhabricatorSubscribableInterface,
PhabricatorFlaggableInterface,
- PhabricatorTokenReceiverInterface {
+ PhabricatorTokenReceiverInterface,
+ PhabricatorDestructableInterface {
protected $slug;
protected $depth;
@@ -180,4 +181,26 @@
public function getUsersToNotifyOfTokenGiven() {
return PhabricatorSubscribersQuery::loadSubscribersForPHID($this->phid);
}
+
+
+/* -( PhabricatorDestructableInterface )----------------------------------- */
+
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+
+ $this->delete();
+
+ $contents = id(new PhrictionContent())->loadAllWhere(
+ 'documentID = %d',
+ $this->getID());
+ foreach ($contents as $content) {
+ $content->delete();
+ }
+
+ $this->saveTransaction();
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 8, 2:00 AM (21 h, 39 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6681481
Default Alt Text
D9976.diff (1 KB)

Event Timeline