Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15335569
D14581.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D14581.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
@@ -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 @@
'(?:(?P<filter>draft|all)/)?' => 'PhamePostListController',
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PhamePostListController',
'blogger/(?P<bloggername>[\w\.-_]+)/' => 'PhamePostListController',
- 'delete/(?P<id>[^/]+)/' => 'PhamePostDeleteController',
'edit/(?:(?P<id>[^/]+)/)?' => 'PhamePostEditController',
'view/(?P<id>\d+)/' => 'PhamePostViewController',
'publish/(?P<id>\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 @@
-<?php
-
-final class PhamePostDeleteController extends PhamePostController {
-
- public function handleRequest(AphrontRequest $request) {
- $viewer = $request->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();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 9 2025, 4:29 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7389778
Default Alt Text
D14581.diff (4 KB)
Attached To
Mode
D14581: Remove delete function in PhamePost
Attached
Detach File
Event Timeline
Log In to Comment