コード例 #1
0
ファイル: search.php プロジェクト: Niknox/aowow
 private function _searchTitle($cndBase)
 {
     $result = [];
     $cnd = array_merge($cndBase, [$this->createLookup(['male_loc' . User::$localeId, 'female_loc' . User::$localeId])]);
     $titles = new TitleList($cnd);
     if ($data = $titles->getListviewData()) {
         if ($this->searchMask & SEARCH_TYPE_OPEN) {
             foreach ($titles->iterate() as $id => $__) {
                 $data[$id]['param1'] = $titles->getField('side');
             }
         }
         $result = array('type' => TYPE_TITLE, 'appendix' => ' (Title)', 'matches' => $titles->getMatches(), 'file' => TitleList::$brickFile, 'data' => $data, 'params' => []);
         if ($titles->getMatches() > $this->maxResults) {
             // $result['params']['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_', $titles->getMatches(), $this->maxResults);
             $result['params']['_truncated'] = 1;
         }
     }
     return $result;
 }
コード例 #2
0
ファイル: search.php プロジェクト: TrinityCore/aowow
 private function _searchTitle($cndBase)
 {
     $cnd = array_merge($cndBase, [$this->createLookup(['male_loc' . User::$localeId, 'female_loc' . User::$localeId])]);
     $titles = new TitleList($cnd);
     if ($data = $titles->getListviewData()) {
         $result['data'] = array_values($data);
         $osInfo = [TYPE_TITLE, ' (Title)', $titles->getMatches(), []];
         if ($this->searchMask & SEARCH_TYPE_OPEN) {
             foreach ($titles->iterate() as $id => $__) {
                 $osInfo[3][$id] = $titles->getField('side');
             }
         }
         if ($titles->getMatches() > $this->maxResults) {
             // $result['note'] = sprintf(Util::$tryNarrowingString, 'LANG.lvnote_', $titles->getMatches(), $this->maxResults);
             $result['_truncated'] = 1;
         }
         return ['title', $result, null, $osInfo];
     }
     return false;
 }