* Fix bug#20175.

This commit is contained in:
mayue
2022-03-01 14:15:21 +08:00
parent 1498d798d4
commit 8fe8034cf4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ $lang->search->result = '搜索结果';
$lang->search->buildSuccessfully = '初始化搜索索引成功';
$lang->search->executeInfo = '为您找到相关结果%s个,耗时%s秒';
$lang->search->buildResult = "创建 %s 索引, 已创建 <strong class='%scount'>%s</strong> 条记录;";
$lang->search->queryTips = "多个id可以使用英文逗号分隔";
$lang->search->queryTips = "多个id可用英文逗号分隔";
$lang->search->modules['all'] = '全部';
$lang->search->modules['task'] = '任务';
+1 -1
View File
@@ -176,7 +176,7 @@ class searchModel extends model
if($operator == 'between' and !isset($this->config->search->dynamic[$value])) $operator = '=';
$condition = $operator . ' ' . $this->dbh->quote($value) . ' ';
if($operator == '=' and $this->post->$fieldName == 'id' and preg_match('/^[0-9]+(,[0-9]+)+/', $value) and !preg_match('/[\x7f-\xff]+/', $value))
if($operator == '=' and $this->post->$fieldName == 'id' and preg_match('/^[0-9]+(,[0-9]+)+$/', $value) and !preg_match('/[\x7f-\xff]+/', $value))
{
$values = explode(',', trim($this->dbh->quote($value), "'"));
foreach($values as $value) $value = "'" . $value . "'";