From 5b2770aa34f0fb329492311080c101c03c493fb3 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 5 Aug 2021 17:08:55 +0200 Subject: Simplify the insert/update HTTP-POST params check Simplify the HTTP-POST parameter presence check in the administration controllers for creating and modifying entities. Since we already use fallback values for each attribute, we don't need a full param check. --- admin/post/insert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin/post/insert.php') diff --git a/admin/post/insert.php b/admin/post/insert.php index bad55ae..1a8cac7 100644 --- a/admin/post/insert.php +++ b/admin/post/insert.php @@ -25,7 +25,7 @@ $Post = new ORM\Entities\Post; #=============================================================================== # Check for insert request #=============================================================================== -if(HTTP::issetPOST('category', 'user', 'slug', 'name', 'body', 'argv', 'time_insert', 'time_update', 'insert')) { +if(HTTP::issetPOST('insert')) { $Post->set('category', HTTP::POST('category') ?: NULL); $Post->set('user', HTTP::POST('user')); $Post->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); -- cgit v1.2.3