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