* uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a * Licença Pública Geral GNU/GPL em português para maiores detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", * junto com este programa, se não, acesse o Portal do Software Público Brasileiro no endereço * www.softwarepublico.gov.br ou escreva para a Fundação do Software Livre(FSF) * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * */ include_once __BASE_PATH__ . '/extensoes/pr_snas/1.0/classes/AutoCompleteDemanda.php'; if ($_REQUEST) { $array = array(); switch ($_REQUEST['action']) { case 'processos-assuntos': $array = AutoComplete::filterAssuntosProcessosFullText($_REQUEST['query']); break; case 'documentos-assuntos': $list = AutoComplete::filterAssuntosDocumentosFullText($_REQUEST['query']); if (is_null($list)) { $list = array(); } foreach ($list as $key => $value) { $array[$key] = array('id' => $value['id'], 'value' => $value['value']); } break; case 'documentos-recebido-por': $auth = Zend_Auth::getInstance()->getStorage()->read(); $list = AutoComplete::filterRecebidoPorFullText($_REQUEST['query'], $auth->ID_UNIDADE); if (is_null($list)) { $list = array(); } foreach ($list as $key => $value) { $array[$key] = array('id' => $value['id'], 'value' => $value['value']);