Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed May 24, 2017 2:57 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Aggregate v0.75 - Color Bug
PostPosted: Mon Mar 03, 2014 3:59 pm 
Offline

Joined: Mon Mar 03, 2014 3:35 pm
Posts: 1
I found a bug with the colors while creating a graph, if I removed an item from a color template, and then added it back in, that new color would always be at the end regardless of the sequence. Digging into the aggregate.php I found at line 181-184:
Code:
$sql = "SELECT color_id " .
"FROM plugin_aggregate_color_template_items " .
"WHERE color_template_id = " . $_color_templates[$i] .
" LIMIT " . ($_selected_graph_index % $num_colors) . ",1";

The sequence is not being utilized and the (default) insert order is being used...
Changing line 184 to this fixes the bug:
Code:
" ORDER BY sequence LIMIT " . ($_selected_graph_index % $num_colors) . ",1";


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group