2010-12-23 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: in function "string2image" fixed when the string have slash characters. * extensions/agents_modules.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3700 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
45dafe4c3b
commit
fbed038d9a
|
@ -1,3 +1,10 @@
|
|||
2010-12-23 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* 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 <sergio.martin@artica.es>
|
||||
|
||||
* include/languages/cs.po
|
||||
|
|
|
@ -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 = '<a href="index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&pure=1&offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'">'
|
||||
. print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
|
||||
. "</a>";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$fullscreen = '<a href="index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&refr=0&offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'">'
|
||||
. print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
|
||||
. "</a>";
|
||||
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue