diff options
author | Thomas Lange <code@nerdmind.de> | 2021-08-05 17:08:55 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-08-05 17:17:31 +0200 |
commit | 5b2770aa34f0fb329492311080c101c03c493fb3 (patch) | |
tree | e1a36f3109a76b8b38414c4b2c81f3edbece2b31 /admin/category/update.php | |
parent | d677315331796d52bd1bcf5908964a53958469d6 (diff) | |
download | blog-5b2770aa34f0fb329492311080c101c03c493fb3.tar.gz blog-5b2770aa34f0fb329492311080c101c03c493fb3.tar.xz blog-5b2770aa34f0fb329492311080c101c03c493fb3.zip |
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.
Diffstat (limited to 'admin/category/update.php')
-rw-r--r-- | admin/category/update.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/category/update.php b/admin/category/update.php index 7cee587..4791d79 100644 --- a/admin/category/update.php +++ b/admin/category/update.php @@ -25,7 +25,7 @@ if(!$Category = $CategoryRepository->find(HTTP::GET('id'))) { #=============================================================================== # Check for update request #=============================================================================== -if(HTTP::issetPOST('parent', 'slug', 'name', 'body', 'argv', 'time_insert', 'time_update', 'update')) { +if(HTTP::issetPOST('update')) { $Category->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); $Category->set('name', HTTP::POST('name') ?: NULL); $Category->set('body', HTTP::POST('body') ?: NULL); |