mdtrooper fab9d73229 2010-12-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/ajax/module.php: fixed when the module
	have a scape html chars.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3658 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-12-15 13:04:43 +00:00

33 lines
1.2 KiB
PHP

<?php
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
$search_modules = get_parameter('search_modules');
if ($search_modules) {
$id_agents = json_decode(safe_output(get_parameter('id_agents')));
$filter = get_parameter('q', '') . '%';
$other_filter = json_decode(safe_output(get_parameter('other_filter')), true);
$modules = get_agent_modules($id_agents, false, (array('nombre' => $filter) + $other_filter));
if ($modules === false) $modules = array();
$modules = array_unique($modules);
foreach ($modules as $module) {
echo safe_output($module) . "\n";
}
}
?>