Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F19040869
D9352.vson.id22270.whitespaceignore-all.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
D9352.vson.id22270.whitespaceignore-all.diff
View Options
diff --git a/src/applications/project/storage/PhabricatorProject.php b/src/applications/project/storage/PhabricatorProject.php
--- a/src/applications/project/storage/PhabricatorProject.php
+++ b/src/applications/project/storage/PhabricatorProject.php
@@ -5,7 +5,8 @@
PhabricatorFlaggableInterface,
PhabricatorPolicyInterface,
PhabricatorSubscribableInterface,
- PhabricatorCustomFieldInterface {
+ PhabricatorCustomFieldInterface,
+ PhabricatorDestructableInterface {
protected $name;
protected $status = PhabricatorProjectStatus::STATUS_ACTIVE;
@@ -247,4 +248,27 @@
}
+/* -( PhabricatorDestructableInterface )----------------------------------- */
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ $this->delete();
+
+ $columns = id(new PhabricatorProjectColumn())
+ ->loadAllWhere('projectPHID = %s', $this->getPHID());
+ foreach ($columns as $column) {
+ $engine->destroyObject($column);
+ }
+
+ $slugs = id(new PhabricatorProjectSlug())
+ ->loadAllWhere('projectPHID = %s', $this->getPHID());
+ foreach ($slugs as $slug) {
+ $slug->delete();
+ }
+
+ $this->saveTransaction();
+ }
+
}
diff --git a/src/applications/project/storage/PhabricatorProjectColumn.php b/src/applications/project/storage/PhabricatorProjectColumn.php
--- a/src/applications/project/storage/PhabricatorProjectColumn.php
+++ b/src/applications/project/storage/PhabricatorProjectColumn.php
@@ -2,7 +2,8 @@
final class PhabricatorProjectColumn
extends PhabricatorProjectDAO
- implements PhabricatorPolicyInterface {
+ implements PhabricatorPolicyInterface,
+ PhabricatorDestructableInterface {
const STATUS_ACTIVE = 0;
const STATUS_DELETED = 1;
@@ -87,4 +88,15 @@
return pht('Users must be able to see a project to see its board.');
}
+
+/* -( PhabricatorDestructableInterface )----------------------------------- */
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ $this->delete();
+ $this->saveTransaction();
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 27, 1:51 PM (1 w, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8348003
Default Alt Text
D9352.vson.id22270.whitespaceignore-all.diff (2 KB)
Attached To
Mode
D9352: Allow projects to be deleted with `./bin/remove destroy`.
Attached
Detach File
Event Timeline
Log In to Comment