2011-02-16 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_db.php: fixed check "<>" in other case as the ajax
	calls in the visual map.
	
	* godmode/reporting/visual_console_builder.editor.js: cleaned source code
	and added some comments.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3871 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-02-16 12:43:24 +00:00
parent 95ee0cc115
commit 5d8e10d087
3 changed files with 24 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2011-02-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: fixed check "<>" in other case as the ajax
calls in the visual map.
* godmode/reporting/visual_console_builder.editor.js: cleaned source code
and added some comments.
2011-02-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es> 2011-02-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* godmode/users/user_list.php: If user is not admin then don't * godmode/users/user_list.php: If user is not admin then don't

View File

@ -906,6 +906,10 @@ function deleteItem() {
selectedItem = null; selectedItem = null;
} }
/**
* All events in the visual map, resize map, click item, double click, drag and
* drop.
*/
function eventsItems() { function eventsItems() {
$('.item').unbind('click'); $('.item').unbind('click');
$('.item').unbind('dragstop'); $('.item').unbind('dragstop');
@ -966,6 +970,7 @@ function eventsItems() {
} }
}); });
//Double click in the item
$('.item').bind('dblclick', function(event, ui) { $('.item').bind('dblclick', function(event, ui) {
event.stopPropagation(); event.stopPropagation();
if (!openPropertiesPanel) { if (!openPropertiesPanel) {

View File

@ -743,10 +743,18 @@ function get_agent_modules ($id_agent = null, $details = false, $filter = false,
if (is_array ($filter)) { if (is_array ($filter)) {
$fields = array (); $fields = array ();
foreach ($filter as $field => $value) { foreach ($filter as $field => $value) {
//Check <> operator
$operatorDistin = false;
if (strlen($value) > 2) {
if ($value[0] . $value[1] == '<>') {
$operatorDistin = true;
}
}
if ($value[0] == '%') { if ($value[0] == '%') {
array_push ($fields, $field.' LIKE "'.$value.'"'); array_push ($fields, $field.' LIKE "'.$value.'"');
} }
else if ($value[0] . $value[1] == '<>') { else if ($operatorDistin) {
array_push($fields, $field.' <> ' . substr($value, 2)); array_push($fields, $field.' <> ' . substr($value, 2));
} }
else if (substr($value, -1) == '%') { else if (substr($value, -1) == '%') {