Index: branches/5.3.x/units/products/products_tag_processor.php =================================================================== diff -u -N -r15971 -r16398 --- branches/5.3.x/units/products/products_tag_processor.php (.../products_tag_processor.php) (revision 15971) +++ branches/5.3.x/units/products/products_tag_processor.php (.../products_tag_processor.php) (revision 16398) @@ -1,6 +1,6 @@ Application->GetSID().'_'.TABLE_PREFIX.'Search'; + /** @var kSearchHelper $search_helper */ + $search_helper = $this->Application->recallObject('SearchHelper'); + $sql = ' SELECT COUNT(ResourceId) - FROM '.$search_results_table.' + FROM ' . $search_helper->getSearchTable() . ' WHERE ItemType=11'; + return $this->Conn->GetOne($sql); } @@ -482,10 +485,9 @@ function PrepareSearchResults($params) { - $names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ()); - - if($this->Application->GetVar('search_type') == 'advanced' || !getArrayValue($names_mapping, $this->Prefix, 'search_results')) - { + if ( $this->Application->GetVar('search_type') == 'advanced' + || !getArrayValue($this->nameToSpecialMapping, 'search_results') + ) { $params = Array('list_name' => 'search_results', 'types' => 'search', 'parent_cat_id' => 'any', @@ -858,4 +860,4 @@ return $url; } -} \ No newline at end of file +}