diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 07f3bc3cd6..48ca582c88 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-12-23 Miguel de Dios + + * include/functions.php: in function "string2image" fixed when the string + have slash characters. + + * extensions/agents_modules.php: cleaned source code style. + 2010-12-23 Sergio Martin * include/languages/cs.po diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 0300f4fc7c..ae3b5c620f 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -35,7 +35,8 @@ function mainAgentsModules() { if (give_acl ($config['id_user'], $group, "AW")) { $sql = sprintf ("UPDATE tagente_modulo SET `flag` = 1 WHERE `id_agente` = ANY(SELECT id_agente FROM tagente WHERE `id_grupo` = %d)",$group); process_sql ($sql); - } else { + } + else { pandora_audit("ACL Violation", "Trying to set flag for groups"); require ("general/noaccess.php"); exit; @@ -43,9 +44,10 @@ function mainAgentsModules() { } - if ($config["realtimestats"] == 0){ + if ($config["realtimestats"] == 0) { $updated_info = __('Last update'). " : ". print_timestamp (get_db_sql ("SELECT min(utimestamp) FROM tgroup_stat"), true); - } else { + } + else { $updated_info = __("Updated at realtime"); } @@ -81,7 +83,8 @@ function mainAgentsModules() { $fullscreen = '' . print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode'))) . ""; - } else { + } + else { $fullscreen = '' . print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode'))) . ""; @@ -121,10 +124,10 @@ function mainAgentsModules() { $cont = 0; foreach($all_modules as $key => $module) { - if($module == $name){ + if($module == $name) { $modules_by_name[$cont-1]['id'][] = $key; } - else{ + else { $name = $module; $modules_by_name[$cont]['name'] = $name; $modules_by_name[$cont]['id'][] = $key; diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 1c05d138de..ba80e91ebb 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1152,8 +1152,12 @@ function string2image($string, $width, $height, $fontsize = 3, imagestring($im, $fontsize, $padding_left, $padding_top, $string, ImageColorAllocate($im,$textrgb[0],$textrgb[1],$textrgb[2])); // Rotates the image $rotated = imagerotate($im, $degrees, 0) ; + + //Cleaned string file name (as the slash) + $stringFile = str_replace('/', '___', $string); + // Generate the image - $file_url = 'attachment/string2image-'.$string.'.gif'; + $file_url = 'attachment/string2image-'.$stringFile.'.gif'; imagegif($rotated, $file_url); imagedestroy($rotated);