* Fix bug #26307
This commit is contained in:
@@ -231,18 +231,11 @@ class search extends control
|
||||
$pager = new pager(0, $this->config->search->recPerPage, $pageID);
|
||||
$results = $this->search->getList($words, $type, $pager);
|
||||
|
||||
if($words)
|
||||
$typeCount = $this->search->getListCount('');
|
||||
$typeList = array('all' => $this->lang->search->modules['all']);
|
||||
foreach($typeCount as $objectType => $count)
|
||||
{
|
||||
$typeCount = $this->search->getListCount($words);
|
||||
$typeList = array('all' => $this->lang->search->modules['all']);
|
||||
foreach($typeCount as $objectType => $count)
|
||||
{
|
||||
$typeList[$objectType] = $this->lang->search->modules[$objectType];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$typeList = $this->lang->search->modules;
|
||||
$typeList[$objectType] = $this->lang->search->modules[$objectType];
|
||||
}
|
||||
|
||||
/* Set session. */
|
||||
|
||||
@@ -612,7 +612,7 @@ class searchModel extends model
|
||||
|
||||
$likeCondition = '';
|
||||
/* Assisted lookup by like condition when only one word. */
|
||||
if(count($words) == 1 and strpos($words[0], ' ') === false) $likeCondition = "OR title like '%{$words[0]}%' OR content like '%{$words[0]}%'";
|
||||
if(count($words) == 1 and strpos($words[0], ' ') === false and !is_numeric($words[0])) $likeCondition = "OR title like '%{$words[0]}%' OR content like '%{$words[0]}%'";
|
||||
|
||||
$words = str_replace('"', '', $against);
|
||||
$words = str_pad($words, 5, '_');
|
||||
|
||||
Reference in New Issue
Block a user