From: Alexander Smirnov Date: Thu, 24 Apr 2025 11:01:46 +0000 (+0300) Subject: prevent from unconsious entering of two or three step X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=1472a72be2724195816f8965f5f5e84fdd86c0f1;p=erp24_rep%2Fyii-erp24%2F.git prevent from unconsious entering of two or three step --- diff --git a/erp24/actions/timetable/StartShiftStepThreeAction.php b/erp24/actions/timetable/StartShiftStepThreeAction.php index 133de72d..6c42d6a8 100755 --- a/erp24/actions/timetable/StartShiftStepThreeAction.php +++ b/erp24/actions/timetable/StartShiftStepThreeAction.php @@ -16,6 +16,9 @@ class StartShiftStepThreeAction extends Action public function run() { + if (!$this->controller->request->isPost) { + return $this->controller->redirect(['timetable/start-shift-step-one']); + } /** @var Admin $userModel */ $userModel = Admin::find()->andWhere(['id' => $_SESSION['admin_id']])->one(); if (!$userModel) { diff --git a/erp24/actions/timetable/StartShiftStepTwoAction.php b/erp24/actions/timetable/StartShiftStepTwoAction.php index 80246ad0..1eac2908 100755 --- a/erp24/actions/timetable/StartShiftStepTwoAction.php +++ b/erp24/actions/timetable/StartShiftStepTwoAction.php @@ -23,6 +23,9 @@ class StartShiftStepTwoAction extends Action public function run() { + if (!$this->controller->request->isPost) { + return $this->controller->redirect(['timetable/start-shift-step-one']); + } /** @var AdminDesktop | null $device */ $device = isset($_COOKIE['device_key']) ? AdminDesktop::getByToken(htmlentities($_COOKIE["device_key"])) : ''; if (!$device) {