mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
2013-02-01 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/functions_utils.php: fixed check color and legends for stacked graphs when haven't set colors all graphs. Fixes: #3602725 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7562 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
70502d2ce9
commit
cc2cf11837
@ -1,3 +1,10 @@
|
||||
2013-02-01 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/graphs/functions_utils.php: fixed check color and legends
|
||||
for stacked graphs when haven't set colors all graphs.
|
||||
|
||||
Fixes: #3602725
|
||||
|
||||
2013-02-01 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_ui.php
|
||||
|
@ -33,10 +33,10 @@ function unserialize_in_temp($serial_id = null, $delete = true, $ttl = 1) {
|
||||
|
||||
$volume = -1;
|
||||
|
||||
for($i = 1 ; $i <= $ttl ; $i++) {
|
||||
for ($i = 1 ; $i <= $ttl ; $i++) {
|
||||
$file_path = sys_get_temp_dir()."/pandora_serialize_".$serial_id."__".$i."__".$ttl;
|
||||
|
||||
if(file_exists($file_path)) {
|
||||
if (file_exists($file_path)) {
|
||||
$volume = $i;
|
||||
break;
|
||||
}
|
||||
@ -75,9 +75,9 @@ function delete_unserialize_in_temp($serial_id = null) {
|
||||
|
||||
function reverse_data($array) {
|
||||
$array2 = array();
|
||||
foreach($array as $index => $values) {
|
||||
foreach($values as $index2 => $value) {
|
||||
$array2[$index2][$index] = $value;
|
||||
foreach ($array as $index => $values) {
|
||||
foreach ($values as $index2 => $value) {
|
||||
$array2[$index2][$index] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,10 +92,10 @@ function stack_data(&$chart_data, &$legend = null, &$color = null) {
|
||||
$chart_data[$val_x][$graph] += $prev_val;
|
||||
$prev_val = $chart_data[$val_x][$graph];
|
||||
$temp_data[$val_x][$key] = $chart_data[$val_x][$graph];
|
||||
if (isset($color)) {
|
||||
if (isset($color[$graph])) {
|
||||
$temp_color[$key] = $color[$graph];
|
||||
}
|
||||
if (isset($legend)) {
|
||||
if (isset($legend[$graph])) {
|
||||
$temp_legend[$key] = $legend[$graph];
|
||||
}
|
||||
$key--;
|
||||
@ -121,7 +121,7 @@ function graph_get_max_index($legend_values) {
|
||||
|
||||
$string_legend = explode("\n",$string_legend);
|
||||
|
||||
foreach($string_legend as $st_lg) {
|
||||
foreach ($string_legend as $st_lg) {
|
||||
$len = strlen($st_lg);
|
||||
if ($len > $max_chars) {
|
||||
$max_chars = $len;
|
||||
@ -133,23 +133,22 @@ function graph_get_max_index($legend_values) {
|
||||
}
|
||||
|
||||
function setup_watermark($water_mark, &$water_mark_file, &$water_mark_url) {
|
||||
if(!is_array($water_mark)) {
|
||||
if (!is_array($water_mark)) {
|
||||
$water_mark['file'] = $water_mark;
|
||||
}
|
||||
|
||||
if(isset($water_mark['file'])) {
|
||||
if (isset($water_mark['file'])) {
|
||||
$water_mark_file = $water_mark['file'];
|
||||
}
|
||||
else {
|
||||
$water_mark_file = '';
|
||||
}
|
||||
|
||||
if(isset($water_mark['url'])) {
|
||||
if (isset($water_mark['url'])) {
|
||||
$water_mark_url = $water_mark['url'];
|
||||
}
|
||||
else {
|
||||
$water_mark_url = '';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user