1.内核更新
2.规则从菜单中批量导入bug修复
This commit is contained in:
@@ -242,6 +242,7 @@ class App
|
||||
{
|
||||
$args = [];
|
||||
// 判断数组类型 数字数组时按顺序绑定参数
|
||||
reset($vars);
|
||||
$type = key($vars) === 0 ? 1 : 0;
|
||||
if ($reflect->getNumberOfParameters() > 0) {
|
||||
$params = $reflect->getParameters();
|
||||
|
||||
@@ -629,6 +629,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
|
||||
// 检测字段
|
||||
if (!empty($this->field)) {
|
||||
$this->db();
|
||||
foreach ($this->data as $key => $val) {
|
||||
if (!in_array($key, $this->field)) {
|
||||
unset($this->data[$key]);
|
||||
|
||||
@@ -93,7 +93,6 @@ class Request
|
||||
* @var array 资源类型
|
||||
*/
|
||||
protected $mimeType = [
|
||||
'html' => 'text/html,application/xhtml+xml,*/*',
|
||||
'xml' => 'application/xml,text/xml,application/x-xml',
|
||||
'json' => 'application/json,text/x-json,application/jsonrequest,text/json',
|
||||
'js' => 'text/javascript,application/javascript,application/x-javascript',
|
||||
@@ -107,6 +106,7 @@ class Request
|
||||
'jpg' => 'image/jpg,image/jpeg,image/pjpeg',
|
||||
'gif' => 'image/gif',
|
||||
'csv' => 'text/csv',
|
||||
'html' => 'text/html,application/xhtml+xml,*/*',
|
||||
];
|
||||
|
||||
protected $content;
|
||||
|
||||
5
core/library/think/cache/driver/Redis.php
vendored
5
core/library/think/cache/driver/Redis.php
vendored
@@ -27,6 +27,7 @@ class Redis extends Driver
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6379,
|
||||
'password' => '',
|
||||
'select' => 0,
|
||||
'timeout' => 0,
|
||||
'expire' => 0,
|
||||
'persistent' => false,
|
||||
@@ -53,6 +54,10 @@ class Redis extends Driver
|
||||
if ('' != $this->options['password']) {
|
||||
$this->handler->auth($this->options['password']);
|
||||
}
|
||||
|
||||
if (0 != $this->options['select']) {
|
||||
$this->handler->select($this->options['select']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1980,6 +1980,9 @@ class Query
|
||||
$model = $this->model;
|
||||
$data = new $model($data);
|
||||
$data->isUpdate(true, isset($options['where']['AND']) ? $options['where']['AND'] : null);
|
||||
if ($this->allowField) {
|
||||
$data->allowField($this->allowField);
|
||||
}
|
||||
// 关联查询
|
||||
if (!empty($options['relation'])) {
|
||||
$data->relationQuery($options['relation']);
|
||||
|
||||
@@ -22,6 +22,7 @@ class Redis extends SessionHandler
|
||||
'host' => '127.0.0.1', // redis主机
|
||||
'port' => 6379, // redis端口
|
||||
'password' => '', // 密码
|
||||
'select' => 0, // 操作库
|
||||
'expire' => 3600, // 有效期(秒)
|
||||
'timeout' => 0, // 超时时间(秒)
|
||||
'persistent' => true, // 是否长连接
|
||||
@@ -56,6 +57,11 @@ class Redis extends SessionHandler
|
||||
if ('' != $this->config['password']) {
|
||||
$this->handler->auth($this->config['password']);
|
||||
}
|
||||
|
||||
if (0 != $this->config['select']) {
|
||||
$this->handler->select($this->config['select']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user