Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15272314
D10306.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10306.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -3575,6 +3575,7 @@
'HeraldTranscript' => array(
'HeraldDAO',
'PhabricatorPolicyInterface',
+ 'PhabricatorDestructibleInterface',
),
'HeraldTranscriptController' => 'HeraldController',
'HeraldTranscriptGarbageCollector' => 'PhabricatorGarbageCollector',
diff --git a/src/applications/herald/storage/transcript/HeraldTranscript.php b/src/applications/herald/storage/transcript/HeraldTranscript.php
--- a/src/applications/herald/storage/transcript/HeraldTranscript.php
+++ b/src/applications/herald/storage/transcript/HeraldTranscript.php
@@ -1,7 +1,9 @@
<?php
final class HeraldTranscript extends HeraldDAO
- implements PhabricatorPolicyInterface {
+ implements
+ PhabricatorPolicyInterface,
+ PhabricatorDestructibleInterface {
protected $objectTranscript;
protected $ruleTranscripts = array();
@@ -196,4 +198,16 @@
}
+/* -( PhabricatorDestructibleInterface )----------------------------------- */
+
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ $this->delete();
+ $this->saveTransaction();
+ }
+
+
}
diff --git a/src/applications/system/engine/PhabricatorDestructionEngine.php b/src/applications/system/engine/PhabricatorDestructionEngine.php
--- a/src/applications/system/engine/PhabricatorDestructionEngine.php
+++ b/src/applications/system/engine/PhabricatorDestructionEngine.php
@@ -48,6 +48,19 @@
}
}
+ // Nuke any Herald transcripts of the object, because they may contain
+ // field data.
+
+ // TODO: Define an interface so we don't have to do this for transactions
+ // and other objects with no Herald adapters?
+ $transcripts = id(new HeraldTranscript())->loadAllWhere(
+ 'objectPHID = %s',
+ $object_phid);
+ foreach ($transcripts as $transcript) {
+ $transcript->destroyObjectPermanently($this);
+ }
+
+ // TODO: Remove stuff from search indexes?
// TODO: PhabricatorFlaggableInterface
// TODO: PhabricatorTokenReceiverInterface
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 12:50 AM (7 h, 43 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7214840
Default Alt Text
D10306.diff (2 KB)
Attached To
Mode
D10306: When destroying an object, destroy its Herald transcripts too
Attached
Detach File
Event Timeline
Log In to Comment