1.1 --- a/system/classes/search.class.php Thu Oct 01 00:07:25 2009 +0100
1.2 +++ b/system/classes/search.class.php Sun Oct 18 02:05:53 2009 +0100
1.3 @@ -412,7 +412,6 @@
1.4 $search_c->setSQL($sql);
1.5 $search_c->setFTSQL($ftsql);
1.6 $search_c->setRank(2);
1.7 - $search_c->setComment(true);
1.8
1.9 return array($search_s, $search_c);
1.10 }
1.11 @@ -510,10 +509,7 @@
1.12 $result_plugins = PLG_doSearch($this->_query, $this->_dateStart, $this->_dateEnd, $this->_topic, $this->_type, $this->_author, $this->_keyType, $page, 5);
1.13
1.14 // Add core searches
1.15 - if ($this->_type == 'all' || $this->_type == 'stories' || $this->_type == 'comments')
1.16 - {
1.17 - $result_plugins = array_merge($result_plugins, $this->_searchStories());
1.18 - }
1.19 + $result_plugins = array_merge($result_plugins, $this->_searchStories());
1.20
1.21 // Loop through all plugins separating the new API from the old
1.22 $new_api = 0;
1.23 @@ -524,9 +520,10 @@
1.24 {
1.25 if (is_a($result, 'SearchCriteria'))
1.26 {
1.27 - if ($this->_type == 'comments' && !$result->getComment()) {
1.28 + if ($this->_type != 'all' && $this->_type != $result->getName())
1.29 + {
1.30 if ($this->_verbose) {
1.31 - COM_errorLog($result->getName() . " using APIv2. Skipped as type is not comments");
1.32 + COM_errorLog($result->getName() . " using APIv2. Skipped as type is not " . $this->_type);
1.33 }
1.34 continue;
1.35 }