aboutsummaryrefslogtreecommitdiffstats
path: root/admin/page
diff options
context:
space:
mode:
Diffstat (limited to 'admin/page')
-rw-r--r--admin/page/delete.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/admin/page/delete.php b/admin/page/delete.php
index d815023..035dbee 100644
--- a/admin/page/delete.php
+++ b/admin/page/delete.php
@@ -25,13 +25,17 @@ if(!$Page = $PageRepository->find(HTTP::GET('id'))) {
#===============================================================================
# Check for delete request
#===============================================================================
-if(HTTP::issetPOST(['token' => Application::getSecurityToken()], 'delete')) {
- try {
- if($PageRepository->delete($Page)) {
- HTTP::redirect(Application::getAdminURL('page/'));
+if(HTTP::issetPOST('delete')) {
+ if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) {
+ try {
+ if($PageRepository->delete($Page)) {
+ HTTP::redirect(Application::getAdminURL('page/'));
+ }
+ } catch(PDOException $Exception) {
+ $messages[] = $Exception->getMessage();
}
- } catch(PDOException $Exception) {
- $messages[] = $Exception->getMessage();
+ } else {
+ $messages[] = $Language->text('error_security_csrf');
}
}