mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进模型类的checkallowfield方法
This commit is contained in:
@@ -1094,19 +1094,16 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
|
|
||||||
protected function checkAllowField($auto = [])
|
protected function checkAllowField($auto = [])
|
||||||
{
|
{
|
||||||
if (!empty($this->field)) {
|
if (true === $this->field) {
|
||||||
if (!empty($this->origin)) {
|
$this->field = $this->getQuery()->getTableInfo('', 'fields');
|
||||||
$this->field = array_keys($this->origin);
|
$field = $this->field;
|
||||||
$field = $this->field;
|
} elseif (!empty($this->field)) {
|
||||||
} elseif (true === $this->field) {
|
$field = array_merge($this->field, $auto);
|
||||||
$this->field = $this->getQuery()->getTableInfo('', 'fields');
|
|
||||||
$field = $this->field;
|
|
||||||
} else {
|
|
||||||
$field = array_merge($this->field, $auto);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$field = [];
|
$field = [];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $field;
|
return $field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user