Merge branch 'master_xieqiyu_31366' into 'master'
* Fix bug#31366. See merge request easycorp/zentaopms!6818
This commit is contained in:
+4
-10
@@ -675,13 +675,10 @@ class searchModel extends model
|
||||
$typeCount = $this->dao->select("objectType, count(*) as objectCount")
|
||||
->from(TABLE_SEARCHINDEX)
|
||||
->where('((vision')->eq($this->config->vision)
|
||||
->beginIF(!empty($allowedObject))->andWhere('objectType')->in($allowedObject)->fi()
|
||||
->andWhere('objectType')->in($allowedObject)
|
||||
->markRight(1)
|
||||
->beginIF(!empty($filterObject))
|
||||
->orWhere('(objectType')->in($filterObject)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->markRight(1)
|
||||
->markRight(2)
|
||||
->andWhere('addedDate')->le(helper::now())
|
||||
->groupBy('objectType')
|
||||
->fetchPairs('objectType', 'objectCount');
|
||||
@@ -717,13 +714,10 @@ class searchModel extends model
|
||||
->from(TABLE_SEARCHINDEX)
|
||||
->where("(MATCH(title,content) AGAINST('{$againstCond}' IN BOOLEAN MODE) >= 1 {$likeCondition})")
|
||||
->andWhere('((vision')->eq($this->config->vision)
|
||||
->beginIF(!empty($allowedObject))->andWhere('objectType')->in($allowedObject)->fi()
|
||||
->andWhere('objectType')->in($allowedObject)
|
||||
->markRight(1)
|
||||
->beginIF(!empty($filterObject))
|
||||
->orWhere('(objectType')->in($filterObject)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->markRight(1)
|
||||
->markRight(2)
|
||||
->andWhere('addedDate')->le(helper::now())
|
||||
->orderBy('score_desc, editedDate_desc')
|
||||
->query();
|
||||
|
||||
Reference in New Issue
Block a user