diff options
Diffstat (limited to 'admin/category')
-rw-r--r-- | admin/category/delete.php | 5 | ||||
-rw-r--r-- | admin/category/insert.php | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/admin/category/delete.php b/admin/category/delete.php index d7b3001..c443c4a 100644 --- a/admin/category/delete.php +++ b/admin/category/delete.php @@ -28,9 +28,8 @@ if(!$Category = $CategoryRepository->find(HTTP::GET('id'))) { if(HTTP::issetPOST('delete')) { if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) { try { - if($CategoryRepository->delete($Category)) { - HTTP::redirect(Application::getAdminURL('category/')); - } + $CategoryRepository->delete($Category); + HTTP::redirect(Application::getAdminURL('category/')); } catch(PDOException $Exception) { $messages[] = $Exception->getMessage(); } diff --git a/admin/category/insert.php b/admin/category/insert.php index 773bb29..c63ad06 100644 --- a/admin/category/insert.php +++ b/admin/category/insert.php @@ -34,9 +34,8 @@ if(HTTP::issetPOST('insert')) { if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) { try { - if($CategoryRepository->insert($Category)) { - HTTP::redirect(Application::getAdminURL('category/')); - } + $CategoryRepository->insert($Category); + HTTP::redirect(Application::getAdminURL('category/')); } catch(PDOException $Exception) { $messages[] = $Exception->getMessage(); } |