function &__performDetailsSearch(&$query_parser, &$result) { foreach ($this->getDetails() as $type => $enabled) { if (!$enabled) { continue; } switch ($type) { case 'crs': $crs_search = ilObjectSearchFactory::_getObjectSearchInstance($query_parser); $crs_search->setFilter(array('crs')); $result->mergeEntries($crs_search->performSearch()); break; case 'grp': $grp_search = ilObjectSearchFactory::_getObjectSearchInstance($query_parser); $grp_search->setFilter(array('grp')); $result->mergeEntries($grp_search->performSearch()); break; case 'lms': $content_search =& ilObjectSearchFactory::_getLMContentSearchInstance($query_parser); $content_search->setFilter($this->__getFilter()); $result->mergeEntries($content_search->performSearch()); break; case 'frm': $forum_search =& ilObjectSearchFactory::_getForumSearchInstance($query_parser); $forum_search->setFilter($this->__getFilter()); $result->mergeEntries($forum_search->performSearch()); break; case 'glo': // Glossary term definition pages $gdf_search =& ilObjectSearchFactory::_getLMContentSearchInstance($query_parser); $gdf_search->setFilter(array('gdf')); $result->mergeEntries($gdf_search->performSearch()); // Glossary terms $gdf_term_search =& ilObjectSearchFactory::_getGlossaryDefinitionSearchInstance($query_parser); $result->mergeEntries($gdf_term_search->performSearch()); break; case 'exc': $exc_search =& ilObjectSearchFactory::_getExerciseSearchInstance($query_parser); $exc_search->setFilter($this->__getFilter()); $result->mergeEntries($exc_search->performSearch()); break; case 'mcst': $mcst_search =& ilObjectSearchFactory::_getMediaCastSearchInstance($query_parser); $result->mergeEntries($mcst_search->performSearch()); break; case 'tst': $tst_search =& ilObjectSearchFactory::_getTestSearchInstance($query_parser); $tst_search->setFilter($this->__getFilter()); $result->mergeEntries($tst_search->performSearch()); break; case 'mep': $mep_search =& ilObjectSearchFactory::_getMediaPoolSearchInstance($query_parser); $mep_search->setFilter($this->__getFilter()); $result->mergeEntries($mep_search->performSearch()); // Mob keyword search $mob_search = ilObjectSearchFactory::_getMediaPoolSearchInstance($query_parser); $mob_search->setFilter($this->__getFilter()); $result->mergeEntries($mob_search->performKeywordSearch()); break; case 'wiki': $wiki_search =& ilObjectSearchFactory::_getWikiContentSearchInstance($query_parser); $wiki_search->setFilter($this->__getFilter()); $result->mergeEntries($wiki_search->performSearch()); /*$result_meta =& $this->__searchMeta($query_parser,'title'); $result->mergeEntries($result_meta); $result_meta =& $this->__searchMeta($query_parser,'description'); $result->mergeEntries($result_meta);*/ break; } } return $result; }
function &__performContentSearch() { include_once 'Services/Search/classes/class.ilObjectSearchFactory.php'; include_once 'Services/Search/classes/class.ilQueryParser.php'; include_once 'Services/Search/classes/class.ilSearchResult.php'; if (!$this->options['lom_content']) { return false; } $res =& new ilSearchResult(); $query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['lom_content'])); #$query_parser->setCombination($this->options['content_ao']); $query_parser->setCombination(QP_COMBINATION_OR); $query_parser->parse(); if ($this->options['type'] == 'all' or $this->options['type'] == 'lms') { // LM content search $lm_search =& ilObjectSearchFactory::_getLMContentSearchInstance($query_parser); $res_cont =& $lm_search->performSearch(); $res->mergeEntries($res_cont); } if ($this->options['type'] == 'all' or $this->options['type'] == 'tst') { $tst_search =& ilObjectSearchFactory::_getTestSearchInstance($query_parser); $res_tes =& $tst_search->performSearch(); $res->mergeEntries($res_tes); } if ($this->options['type'] == 'all' or $this->options['type'] == 'mep') { $med_search =& ilObjectSearchFactory::_getMediaPoolSearchInstance($query_parser); $res_med =& $med_search->performSearch(); $res->mergeEntries($res_med); } if ($this->options['type'] == 'all' or $this->options['type'] == 'glo') { $glo_search =& ilObjectSearchFactory::_getGlossaryDefinitionSearchInstance($query_parser); $res_glo =& $glo_search->performSearch(); $res->mergeEntries($res_glo); } if ($this->options['type'] == 'all' or $this->options['type'] == 'webr') { $web_search =& ilObjectSearchFactory::_getWebresourceSearchInstance($query_parser); $res_web =& $web_search->performSearch(); $res->mergeEntries($res_web); } if ($tit_res = $this->__performTitleSearch()) { $res->mergeEntries($tit_res); } return $res; }