aboutsummaryrefslogtreecommitdiffstats
path: root/admin/post
diff options
context:
space:
mode:
Diffstat (limited to 'admin/post')
-rw-r--r--admin/post/delete.php5
-rw-r--r--admin/post/insert.php5
2 files changed, 4 insertions, 6 deletions
diff --git a/admin/post/delete.php b/admin/post/delete.php
index 3fb4c84..501cae4 100644
--- a/admin/post/delete.php
+++ b/admin/post/delete.php
@@ -28,9 +28,8 @@ if(!$Post = $PostRepository->find(HTTP::GET('id'))) {
if(HTTP::issetPOST('delete')) {
if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) {
try {
- if($PostRepository->delete($Post)) {
- HTTP::redirect(Application::getAdminURL('post/'));
- }
+ $PostRepository->delete($Post);
+ HTTP::redirect(Application::getAdminURL('post/'));
} catch(PDOException $Exception) {
$messages[] = $Exception->getMessage();
}
diff --git a/admin/post/insert.php b/admin/post/insert.php
index 1a8cac7..1b04ecc 100644
--- a/admin/post/insert.php
+++ b/admin/post/insert.php
@@ -37,9 +37,8 @@ if(HTTP::issetPOST('insert')) {
if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) {
try {
- if($PostRepository->insert($Post)) {
- HTTP::redirect(Application::getAdminURL('post/'));
- }
+ $PostRepository->insert($Post);
+ HTTP::redirect(Application::getAdminURL('post/'));
} catch(PDOException $Exception) {
$messages[] = $Exception->getMessage();
}