← All changes
|
backend/src/Controllers/Entry/DeleteEntryController.php
+0
-7
0.6.1.1
→
1.5
View file →
| @@ -6,13 +6,8 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace IvyForms\Controllers\Entry; |
| 9 | 9 | |
| 10 | -// phpcs:disable PSR1.Files.SideEffects | |
| 11 | -if (!defined('ABSPATH')) { | |
| 12 | - exit; // Exit if accessed directly | |
| 13 | -} | |
| 14 | - | |
| 15 | 10 | use IvyForms\Common\Exceptions\ForbiddenException; |
| 16 | 11 | use IvyForms\Common\Exceptions\InvalidArgumentException; |
| 17 | 12 | use IvyForms\Common\Exceptions\NotFoundException; |
| 18 | 13 | use IvyForms\Common\Sanitizer\Sanitizer; |
| @@ -59,10 +54,8 @@ | ||
| 59 | 54 | throw new InvalidArgumentException( |
| 60 | 55 | BackendStrings::getExceptionStrings()['entry_id_required'] |
| 61 | 56 | ); |
| 62 | 57 | } |
| 63 | - | |
| 64 | - | |
| 65 | 58 | $id = Sanitizer::sanitizeId($data->get_param('id')) ; |
| 66 | 59 | |
| 67 | 60 | // Bulk delete all entry fields for the entry |
| 68 | 61 | $this->entryService->getDeletionManager()->deleteEntryFieldsByEntryIds([$id]); |