From d7394e29dfb3afd1a756dde0f3bddf7bd309cee6 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 27 May 2017 10:38:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index 69384667..1df14f11 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -165,7 +165,7 @@ class Validate } /** - * 获取验证规则的默认提示信息 + * 设置验证规则的默认提示信息 * @access protected * @param string|array $type 验证规则类型名称或者数组 * @param string $msg 验证提示信息 From 1bb78d11b722ddc9f51c3b1f738fa94806b9c0c1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 27 May 2017 22:41:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=94=B9=E8=BF=9Bin=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E5=8E=BB=E9=87=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index ecec0b0e..23f88836 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -376,7 +376,7 @@ abstract class Builder if ($value instanceof \Closure) { $whereStr .= $key . ' ' . $exp . ' ' . $this->parseClosure($value); } else { - $value = is_array($value) ? $value : explode(',', $value); + $value = array_unique(is_array($value) ? $value : explode(',', $value)); if (array_key_exists($field, $binds)) { $bind = []; $array = []; From 73cafb95dc7fe12ec98426ef0adbaeaed8482aad Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 29 May 2017 09:30:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Query=E7=B1=BB=E7=9A=84va?= =?UTF-8?q?lue=E5=92=8Ccolumn=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index b08436cd..a8722a1a 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -395,7 +395,7 @@ class Query public function value($field, $default = null, $force = false) { $result = false; - if (empty($options['fetch_sql']) && !empty($this->options['cache'])) { + if (empty($this->options['fetch_sql']) && !empty($this->options['cache'])) { // 判断查询缓存 $cache = $this->options['cache']; if (empty($this->options['table'])) { @@ -438,7 +438,7 @@ class Query public function column($field, $key = '') { $result = false; - if (empty($options['fetch_sql']) && !empty($this->options['cache'])) { + if (empty($this->options['fetch_sql']) && !empty($this->options['cache'])) { // 判断查询缓存 $cache = $this->options['cache']; if (empty($this->options['table'])) {