private function _searchWorldEvent($cndBase) { $result = []; $cnd = array_merge($cndBase, array(array('OR', $this->createLookup(['h.name_loc' . User::$localeId]), ['AND', $this->createLookup(['e.description']), ['e.holidayId', 0]]))); $wEvents = new WorldEventList($cnd); if ($data = $wEvents->getListviewData()) { if ($this->searchMask & SEARCH_TYPE_REGULAR) { $this->extendGlobalData($wEvents->getJSGlobals()); } // as allways: dates are updated in postCache-step $result = array('type' => TYPE_WORLDEVENT, 'appendix' => ' (World Event)', 'matches' => $wEvents->getMatches(), 'file' => WorldEventList::$brickFile, 'data' => $data, 'params' => []); if ($wEvents->getMatches() > $this->maxResults) { // $result['params']['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_', $wEvents->getMatches(), $this->maxResults); $result['params']['_truncated'] = 1; } } return $result; }
private function _searchWorldEvent($cndBase) { $cnd = array_merge($cndBase, array(array('OR', $this->createLookup(['h.name_loc' . User::$localeId]), ['AND', $this->createLookup(['e.description']), ['e.holidayId', 0]]))); $wEvents = new WorldEventList($cnd); if ($data = $wEvents->getListviewData()) { if ($this->searchMask & SEARCH_TYPE_REGULAR) { $this->extendGlobalData($wEvents->getJSGlobals()); } $result['data'] = array_values($data); $osInfo = [TYPE_WORLDEVENT, ' (World Event)', $wEvents->getMatches()]; // as allways: dates are updated in postCache-step if ($wEvents->getMatches() > $this->maxResults) { // $result['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_', $wEvents->getMatches(), $this->maxResults); $result['_truncated'] = 1; } return ['event', $result, null, $osInfo]; } return false; }