summaryrefslogtreecommitdiff
path: root/handler/admin/AutoDelete.php
diff options
context:
space:
mode:
Diffstat (limited to 'handler/admin/AutoDelete.php')
-rw-r--r--handler/admin/AutoDelete.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/handler/admin/AutoDelete.php b/handler/admin/AutoDelete.php
deleted file mode 100644
index 80c8eef..0000000
--- a/handler/admin/AutoDelete.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-namespace handler\admin;
-
-use csrf;
-use NotFoundException;
-use pages;
-use posts;
-use RedirectResponse;
-use Response;
-
-class AutoDelete extends AdminRequestHandler {
-
- public function get(): Response {
- list($name) = $this->input('short_name');
-
- $post = posts::getPostByName($name);
- if ($post) {
- csrf::check('delpost'.$post->id);
- posts::delete($post);
- return new RedirectResponse('/');
- }
-
- $page = pages::getPageByName($name);
- if ($page) {
- csrf::check('delpage'.$page->shortName);
- pages::delete($page);
- return new RedirectResponse('/');
- }
-
- throw new NotFoundException();
- }
-
-} \ No newline at end of file