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 @@ -3302,7 +3302,6 @@ 'PhamePost' => 'applications/phame/storage/PhamePost.php', 'PhamePostCommentController' => 'applications/phame/controller/post/PhamePostCommentController.php', 'PhamePostController' => 'applications/phame/controller/post/PhamePostController.php', - 'PhamePostDeleteController' => 'applications/phame/controller/post/PhamePostDeleteController.php', 'PhamePostEditController' => 'applications/phame/controller/post/PhamePostEditController.php', 'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php', 'PhamePostFramedController' => 'applications/phame/controller/post/PhamePostFramedController.php', @@ -7618,7 +7617,6 @@ ), 'PhamePostCommentController' => 'PhamePostController', 'PhamePostController' => 'PhameController', - 'PhamePostDeleteController' => 'PhamePostController', 'PhamePostEditController' => 'PhamePostController', 'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor', 'PhamePostFramedController' => 'PhamePostController', diff --git a/src/applications/phame/application/PhabricatorPhameApplication.php b/src/applications/phame/application/PhabricatorPhameApplication.php --- a/src/applications/phame/application/PhabricatorPhameApplication.php +++ b/src/applications/phame/application/PhabricatorPhameApplication.php @@ -44,7 +44,6 @@ '(?:(?Pdraft|all)/)?' => 'PhamePostListController', '(?:query/(?P[^/]+)/)?' => 'PhamePostListController', 'blogger/(?P[\w\.-_]+)/' => 'PhamePostListController', - 'delete/(?P[^/]+)/' => 'PhamePostDeleteController', 'edit/(?:(?P[^/]+)/)?' => 'PhamePostEditController', 'view/(?P\d+)/' => 'PhamePostViewController', 'publish/(?P\d+)/' => 'PhamePostPublishController', diff --git a/src/applications/phame/controller/post/PhamePostDeleteController.php b/src/applications/phame/controller/post/PhamePostDeleteController.php deleted file mode 100644 --- a/src/applications/phame/controller/post/PhamePostDeleteController.php +++ /dev/null @@ -1,41 +0,0 @@ -getViewer(); - - $post = id(new PhamePostQuery()) - ->setViewer($viewer) - ->withIDs(array($request->getURIData('id'))) - ->requireCapabilities( - array( - PhabricatorPolicyCapability::CAN_EDIT, - )) - ->executeOne(); - if (!$post) { - return new Aphront404Response(); - } - - if ($request->isFormPost()) { - $post->delete(); - return id(new AphrontRedirectResponse()) - ->setURI('/phame/post/'); - } - - $cancel_uri = $this->getApplicationURI('/post/view/'.$post->getID().'/'); - - $dialog = id(new AphrontDialogView()) - ->setUser($viewer) - ->setTitle(pht('Delete Post?')) - ->appendChild( - pht( - 'Really delete the post "%s"? It will be gone forever.', - $post->getTitle())) - ->addSubmitButton(pht('Delete')) - ->addCancelButton($cancel_uri); - - return id(new AphrontDialogResponse())->setDialog($dialog); - } - -} diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php --- a/src/applications/phame/controller/post/PhamePostViewController.php +++ b/src/applications/phame/controller/post/PhamePostViewController.php @@ -157,14 +157,6 @@ ->setWorkflow(true)); } - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-times') - ->setHref($this->getApplicationURI('post/delete/'.$id.'/')) - ->setName(pht('Delete Post')) - ->setDisabled(!$can_edit) - ->setWorkflow(true)); - $blog = $post->getBlog(); $can_view_live = $blog && !$post->isDraft();