Commit 832bbc13 by san58

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

1 parent 50b22cb3
......@@ -80,16 +80,16 @@ class AjaxController extends Controller
Yii::$app->db->createCommand()
->update('{{%host}}', [$filter_name => Host::STATUS_OFF], ['in', 'id', $update[Host::STATUS_OFF]])
->execute();
$count_update[Host::STATUS_OFF]+=count($update[$filter_type][Host::STATUS_OFF]);
$update[$filter_type][Host::STATUS_OFF] = [];
$count_update[Host::STATUS_OFF]+=count($update[Host::STATUS_OFF]);
$update[Host::STATUS_OFF] = [];
}
if (count($update[Host::STATUS_ON])>0)
{
Yii::$app->db->createCommand()
->update('{{%host}}', [$filter_name => Host::STATUS_ON], ['in', 'id', $update[Host::STATUS_ON]])
->execute();
$count_update[Host::STATUS_ON]+=count($update[$filter_type][Host::STATUS_ON]);
$update[$filter_type][Host::STATUS_ON] = [];
$count_update[Host::STATUS_ON]+=count($update[Host::STATUS_ON]);
$update[Host::STATUS_ON] = [];
}
unset($filter_name);
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!