*** /home/lloyd/drraw-2.2a4/drraw.cgi Wed Nov 21 09:40:51 2007 --- /srv/www/cgi-bin/drraw.cgi Thu Nov 22 14:42:59 2007 *************** *** 3437,3442 **** --- 3438,3444 ---- my $count = 0; my @colors = param("${ds}_tColors"); my $dsdef = ''; + my @CDEF_list = (); foreach $file ( sort(@rrdfiles) ) { next unless ( $file =~ /\.rrd$/ ); if ( $file =~ /$re/ ) { *************** *** 3460,3466 **** if ( param("${ds}_tCDEF") ne '' ) { my $cdef = param("${ds}_tCDEF"); $cdef =~ s/\$/$ds$count/g; ! push @CDEF, join(':', 'CDEF', uc($ds . $count) .'='. $cdef); } --- 3462,3468 ---- if ( param("${ds}_tCDEF") ne '' ) { my $cdef = param("${ds}_tCDEF"); $cdef =~ s/\$/$ds$count/g; ! push @CDEF_list, join(':', 'CDEF', uc($ds . $count) .'='. $cdef); } *************** *** 3497,3502 **** --- 3499,3505 ---- } push @CDEF, join(':', 'CDEF', $ds .'='. $dsdef) unless ( param("${ds}_Formula") eq '' ); + push @CDEF, @CDEF_list; } else { my $file = param("${ds}_File"); $file =~ s/:/\\:/g;