fix togglekey asci chars
This commit is contained in:
parent
35accca381
commit
3926498f3e
@ -7,6 +7,7 @@ use yii\base\Model;
|
|||||||
use common\models\CardKeyAssignment;
|
use common\models\CardKeyAssignment;
|
||||||
use common\models\Key;
|
use common\models\Key;
|
||||||
use yii\helpers\ArrayHelper;
|
use yii\helpers\ArrayHelper;
|
||||||
|
use common\components\Helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ContactForm is the model behind the contact form.
|
* ContactForm is the model behind the contact form.
|
||||||
@ -43,6 +44,8 @@ class KeyToggleForm extends Model
|
|||||||
public function toggleKey(){
|
public function toggleKey(){
|
||||||
$query= Key::find();
|
$query= Key::find();
|
||||||
|
|
||||||
|
$this->key = Helper::fixAsciiChars($this->key);
|
||||||
|
|
||||||
$query->andWhere(['or',
|
$query->andWhere(['or',
|
||||||
['and',[ 'in','key.number' , [$this->key]],"trim(coalesce(key.number, '')) <>'' " ],
|
['and',[ 'in','key.number' , [$this->key]],"trim(coalesce(key.number, '')) <>'' " ],
|
||||||
['and', ['in','key.rfid_key' ,[ $this->key ] ],"trim(coalesce(key.rfid_key, '')) <>'' "],
|
['and', ['in','key.rfid_key' ,[ $this->key ] ],"trim(coalesce(key.rfid_key, '')) <>'' "],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user