diff --git a/src/applications/badges/storage/PhabricatorBadgesBadge.php b/src/applications/badges/storage/PhabricatorBadgesBadge.php index 91ed3cf34d..be83c8404f 100644 --- a/src/applications/badges/storage/PhabricatorBadgesBadge.php +++ b/src/applications/badges/storage/PhabricatorBadgesBadge.php @@ -186,7 +186,7 @@ final class PhabricatorBadgesBadge extends PhabricatorBadgesDAO ->execute(); foreach ($awards as $award) { - $engine->destroyObjectPermanently($award); + $engine->destroyObject($award); } $this->openTransaction(); diff --git a/src/applications/phame/storage/PhameBlog.php b/src/applications/phame/storage/PhameBlog.php index 6d9c51071a..23ab671552 100644 --- a/src/applications/phame/storage/PhameBlog.php +++ b/src/applications/phame/storage/PhameBlog.php @@ -322,10 +322,12 @@ final class PhameBlog extends PhameDAO $this->openTransaction(); - $posts = id(new PhamePost()) - ->loadAllWhere('blogPHID = %s', $this->getPHID()); + $posts = id(new PhamePostQuery()) + ->setViewer($engine->getViewer()) + ->withBlogPHIDs(array($this->getPHID())) + ->execute(); foreach ($posts as $post) { - $post->delete(); + $engine->destroyObject($post); } $this->delete(); diff --git a/src/applications/phame/storage/PhamePost.php b/src/applications/phame/storage/PhamePost.php index 2d8fc887c5..8078c5055c 100644 --- a/src/applications/phame/storage/PhamePost.php +++ b/src/applications/phame/storage/PhamePost.php @@ -258,15 +258,15 @@ final class PhamePost extends PhameDAO return $timeline; } + /* -( PhabricatorDestructibleInterface )----------------------------------- */ + public function destroyObjectPermanently( PhabricatorDestructionEngine $engine) { $this->openTransaction(); - $this->delete(); - $this->saveTransaction(); }