Exemplo n.º 1
0
 public function actionSearch()
 {
     $this->title = "Результат поиска: " . $this->request->query;
     $head = $this->getHead(array("/css/main.css"));
     $head->js = array("/js/main.js");
     $hornav = $this->getHornav();
     $hornav->addData("Результат поиска");
     $this->title = "Результат поиска: " . $this->request->query;
     $this->meta_desc = "Результат поиска " . $this->request->query . ".";
     $this->meta_key = "поиск, поиск " . $this->request->query;
     $articles = ProductDB::search($this->request->query);
     $sr = new SearchResult();
     if (mb_strlen($this->request->query) < Config::MIN_SEARCH_LEN) {
         $sr->error_len = true;
     }
     $sr->hornav = $hornav;
     $sr->field = "full_text";
     $sr->query = $this->request->query;
     $sr->data = $articles;
     $this->render($head, $sr);
 }