$max_d_end = $d_end; $start_date = $start; $end_date = $end; } else { if (Date::compare($min_d_start, $d_start) > 0) { $min_d_start = $d_start->duplicate(); $start_date = $start; } if (Date::compare($max_d_end, $d_end) < 0) { $max_d_end = $d_end->duplicate(); $end_date = $end; } } } } $gantt->setDateRange($start_date, $end_date); $graph = $gantt->getGraph(); if (is_file(TTF_DIR . 'FreeSans.ttf')) { $graph->scale->actinfo->SetFont(FF_CUSTOM); } //This kludgy function echos children tasks as threads function showgtask(&$a, $level = 0) { /* Add tasks to gantt chart */ global $gantt_arr; $gantt_arr[] = array($a, $level); } function findgchild(&$tarr, $parent, $level = 0) { global $projects; $level = $level + 1;