Ejemplo n.º 1
0
 /**
  * Recursive helper for _getMergedArray.
  */
 function &_getMergedPhraseResults(&$conference, &$phrase, $type, $publishedFrom, $publishedTo, $resultsPerKeyword, $resultCacheHours)
 {
     if (isset($phrase['+'])) {
         $mergedResults =& PaperSearch::_getMergedKeywordResults($conference, $phrase, $type, $publishedFrom, $publishedTo, $resultsPerKeyword, $resultCacheHours);
         return $mergedResults;
     }
     $mergedResults = array();
     $paperSearchDao =& DAORegistry::getDAO('PaperSearchDAO');
     $results =& $paperSearchDao->getPhraseResults($conference, $phrase, $publishedFrom, $publishedTo, $type, $resultsPerKeyword, $resultCacheHours);
     while (!$results->eof()) {
         $result =& $results->next();
         $paperId = $result['paper_id'];
         if (!isset($mergedResults[$paperId])) {
             $mergedResults[$paperId] = $result['count'];
         } else {
             $mergedResults[$paperId] += $result['count'];
         }
     }
     return $mergedResults;
 }