Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15431614
D14729.id35621.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
D14729.id35621.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
@@ -6784,6 +6784,7 @@
'PhabricatorPolicyInterface',
'PhabricatorApplicationTransactionInterface',
'PhabricatorCustomFieldInterface',
+ 'PhabricatorDestructibleInterface',
),
'PhabricatorOwnersPackageDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorOwnersPackageEditEngine' => 'PhabricatorEditEngine',
diff --git a/src/applications/owners/storage/PhabricatorOwnersPackage.php b/src/applications/owners/storage/PhabricatorOwnersPackage.php
--- a/src/applications/owners/storage/PhabricatorOwnersPackage.php
+++ b/src/applications/owners/storage/PhabricatorOwnersPackage.php
@@ -5,7 +5,8 @@
implements
PhabricatorPolicyInterface,
PhabricatorApplicationTransactionInterface,
- PhabricatorCustomFieldInterface {
+ PhabricatorCustomFieldInterface,
+ PhabricatorDestructibleInterface {
protected $name;
protected $originalName;
@@ -338,4 +339,30 @@
return $this;
}
+
+/* -( PhabricatorDestructibleInterface )----------------------------------- */
+
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ $conn_w = $this->establishConnection('w');
+
+ queryfx(
+ $conn_w,
+ 'DELETE FROM %T WHERE packageID = %d',
+ id(new PhabricatorOwnersPath())->getTableName(),
+ $this->getID());
+
+ queryfx(
+ $conn_w,
+ 'DELETE FROM %T WHERE packageID = %d',
+ id(new PhabricatorOwnersOwner())->getTableName(),
+ $this->getID());
+
+ $this->delete();
+ $this->saveTransaction();
+ }
+
}
diff --git a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
--- a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
+++ b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
@@ -1501,6 +1501,11 @@
'%s updated %s for %s, added %s: %s; removed %s: %s.' =>
'%s updated %s for %s, added: %5$s; removed; %7$s.',
+
+ 'Permanently destroyed %s object(s).' => array(
+ 'Permanently destroyed %s object.',
+ 'Permanently destroyed %s objects.',
+ ),
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 1:29 PM (1 w, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704550
Default Alt Text
D14729.id35621.diff (2 KB)
Attached To
Mode
D14729: Implement DestructibleInterface for Owners Packages
Attached
Detach File
Event Timeline
Log In to Comment