![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
On 24/10/2013 01:30, Paul Gear wrote:
On 10/24/2013 08:54 AM, Tom Laermans wrote:
On 24/10/2013 00:34, Paul Gear wrote:
On 10/24/2013 07:46 AM, Adam Armstrong wrote:
On 2013-10-23 22:40, Paul Gear wrote:
... I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME";
... Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
I was merely preserving backwards compatibility with what was there. If we use a different key instead of ids, then we could do it without breaking compatibility with existing configs.
Or would you rather I just chuck the whole thing and tell people who use it to update their configs?
But then you have to keep the old code next to the new code. And we all know how much Adam loves cruft.
But doing that would be my preference, since it's nice to users.
If you do the check first, and convert it to the new array with only a single entry, and use 1 code block to parse that, it's only a little cruft. :)
There's quite a bit of this going on in definitions.inc.php for old settings. Also rancid path was only one var instead of an array once, I'm sure there's is_array() in there, etc...
Tom