shish 3 lat temu
rodzic
commit
61111ea595
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      app-hd/controllers/WorkController.php

+ 5 - 3
app-hd/controllers/WorkController.php

@@ -51,13 +51,15 @@ class WorkController extends BaseController
         $get = Yii::$app->request->get();
         $where = [];
         $where['mainId'] = $this->mainId;
-        $sh = $get['sh'] ?? 0;
-        $where['sh'] = $sh;
+        $shStr = $get['sh'] ?? '';
+        if ($shStr == 'yes') {
+            $where['sh'] = 1;
+        }
         if (isset($get['status']) && $get['status'] >= 0) {
             $status = $get['status'];
             $where['status'] = $status;
         }
-        if ($sh == 0) {
+        if (empty($shStr)) {
             if (isset($get['fromType']) && is_numeric($get['fromType'])) {
                 $where['fromType'] = $get['fromType'];
             } else {