← All changes
|
backend/src/Controllers/Entry/UpdateEntryStatusController.php
+2
-7
0.3.1
→
1.5.1
View file →
| @@ -1,18 +1,13 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * @copyright © TMS-Plugins. All rights reserved. | |
| 4 | + * @copyright © Melograno Venture Studio. All rights reserved. | |
| 5 | 5 | * @licence See COPYING.md for license details. |
| 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\QueryExecutionException; |
| 18 | 13 | use IvyForms\Common\Sanitizer\Sanitizer; |
| @@ -63,9 +58,9 @@ | ||
| 63 | 58 | |
| 64 | 59 | $status = sanitize_text_field($data->get_params()['value'] ?? ''); |
| 65 | 60 | |
| 66 | 61 | // Update the status in the database |
| 67 | - $this->entryService->updateEntryStatus($entryId, $status); | |
| 62 | + $this->entryService->getEntryManager()->updateEntryStatus($entryId, $status); | |
| 68 | 63 | |
| 69 | 64 | return new WP_REST_Response([ |
| 70 | 65 | 'message' => BackendStrings::getCommonStrings()['ok'], |
| 71 | 66 | 'data' => [ |