diff --git a/src/applications/badges/storage/PhabricatorBadgesBadge.php b/src/applications/badges/storage/PhabricatorBadgesBadge.php --- a/src/applications/badges/storage/PhabricatorBadgesBadge.php +++ b/src/applications/badges/storage/PhabricatorBadgesBadge.php @@ -186,7 +186,7 @@ ->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 --- a/src/applications/phame/storage/PhameBlog.php +++ b/src/applications/phame/storage/PhameBlog.php @@ -322,10 +322,12 @@ $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 --- a/src/applications/phame/storage/PhamePost.php +++ b/src/applications/phame/storage/PhamePost.php @@ -258,15 +258,15 @@ return $timeline; } + /* -( PhabricatorDestructibleInterface )----------------------------------- */ + public function destroyObjectPermanently( PhabricatorDestructionEngine $engine) { $this->openTransaction(); - $this->delete(); - $this->saveTransaction(); }