diff --git a/core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php b/core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php index 59446e2..9b26cdc 100755 --- a/core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php +++ b/core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php @@ -120,8 +120,14 @@ public function search($str,array $scriptProperties = array()) { } } else { $term = $wildcard.$this->searchString.$wildcard; - foreach ($docFields as $field) {$whereArray[] = array($field.':LIKE', $term,xPDOQuery::SQL_OR,$whereGroup);} - $whereArray[] = array('TemplateVarResources.value:LIKE', $term, xPDOQuery::SQL_OR, $whereGroup); + foreach ($docFields as $field) { + $whereArray[] = array($field.':LIKE', $term, xPDOQuery::SQL_OR, $whereGroup); + } + + if ($includeTVs) { + $whereArray[] = array('TemplateVarResources.value:LIKE', $term, xPDOQuery::SQL_OR, $whereGroup); + } + if (is_array($customPackages) && !empty($customPackages)) { foreach ($customPackages as $package) { $fields = explode(',',$package[1]); @@ -272,4 +278,4 @@ public function addRelevancyCondition(&$query, $options) { return true; } -} +} \ No newline at end of file