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\Key;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use common\components\Helper;
|
||||
|
||||
/**
|
||||
* ContactForm is the model behind the contact form.
|
||||
@ -43,6 +44,8 @@ class KeyToggleForm extends Model
|
||||
public function toggleKey(){
|
||||
$query= Key::find();
|
||||
|
||||
$this->key = Helper::fixAsciiChars($this->key);
|
||||
|
||||
$query->andWhere(['or',
|
||||
['and',[ 'in','key.number' , [$this->key]],"trim(coalesce(key.number, '')) <>'' " ],
|
||||
['and', ['in','key.rfid_key' ,[ $this->key ] ],"trim(coalesce(key.rfid_key, '')) <>'' "],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user