Commit 832bbc13 by san58

исправил применение фильтра

1 parent 50b22cb3
...@@ -80,16 +80,16 @@ class AjaxController extends Controller ...@@ -80,16 +80,16 @@ class AjaxController extends Controller
Yii::$app->db->createCommand() Yii::$app->db->createCommand()
->update('{{%host}}', [$filter_name => Host::STATUS_OFF], ['in', 'id', $update[Host::STATUS_OFF]]) ->update('{{%host}}', [$filter_name => Host::STATUS_OFF], ['in', 'id', $update[Host::STATUS_OFF]])
->execute(); ->execute();
$count_update[Host::STATUS_OFF]+=count($update[$filter_type][Host::STATUS_OFF]); $count_update[Host::STATUS_OFF]+=count($update[Host::STATUS_OFF]);
$update[$filter_type][Host::STATUS_OFF] = []; $update[Host::STATUS_OFF] = [];
} }
if (count($update[Host::STATUS_ON])>0) if (count($update[Host::STATUS_ON])>0)
{ {
Yii::$app->db->createCommand() Yii::$app->db->createCommand()
->update('{{%host}}', [$filter_name => Host::STATUS_ON], ['in', 'id', $update[Host::STATUS_ON]]) ->update('{{%host}}', [$filter_name => Host::STATUS_ON], ['in', 'id', $update[Host::STATUS_ON]])
->execute(); ->execute();
$count_update[Host::STATUS_ON]+=count($update[$filter_type][Host::STATUS_ON]); $count_update[Host::STATUS_ON]+=count($update[Host::STATUS_ON]);
$update[$filter_type][Host::STATUS_ON] = []; $update[Host::STATUS_ON] = [];
} }
unset($filter_name); unset($filter_name);
unset($update); unset($update);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!