Ejemplo n.º 1
0
 public function executeSearch(sfWebRequest $request)
 {
     if (!($query = $request->getParameter('query'))) {
         return $this->forward('mailbox', 'index');
     }
     $this->gc_mailbox_list = GcMailboxPeer::getForLuceneQuery($query);
     if ($request->isXmlHttpRequest()) {
         if ('*' == $query || !$this->gc_mailbox_list) {
             return $this->renderText('No hay resultados.');
         } else {
             return $this->renderPartial('mailbox/list', array('gc_mailbox_list' => $this->gc_mailbox_list));
         }
     }
 }