/** @deprecated */ function smart_slice($arr, $notUsed1, $notUsed2, $notUsed3) { return dumb_slice($arr); }
$width = 1600; $gantt_start_date = w2PgetParam($_GET, 'start_date', $start_min); $gantt_end_date = w2PgetParam($_GET, 'end_date', $end_max); $s1 = $gantt_start_date ? new w2p_Utilities_Date($gantt_start_date) : new w2p_Utilities_Date(); $e1 = $gantt_end_date ? new w2p_Utilities_Date($gantt_end_date) : new w2p_Utilities_Date(); //consider critical (concerning end date) tasks as well if ($caller != 'todo') { $start_min = $projects[$project_id]['project_start_date']; $end_max = $projects[$project_id]['project_end_date'] > $criticalTasks[0]['task_end_date'] ? $projects[$project_id]['project_end_date'] : $criticalTasks[0]['task_end_date']; } $count = 0; /* * Prepare Gantt_chart loop */ $gtask_sliced = array(); $gtask_sliced = dumb_slice($gantt_arr, 30); // smart_slice( $gantt_arr, $showNoMilestones, $printpdfhr, $e1->dateDiff($s1) ); $page = 0; // Numbering of output files $outpfiles = array(); // array of output files to be returned to caller foreach ($gtask_sliced as $gts) { if (!$gantt_start_date || !$gantt_end_date) { // find out DateRange from gant_arr $d_start = new w2p_Utilities_Date(); $d_end = new w2p_Utilities_Date(); $taskArray = count($gantt_arr); for ($i = 0, $i_cmp = $taskArray; $i < $i_cmp; $i++) { $a = $gantt_arr[$i][0]; $start = substr($a['task_start_date'], 0, 10); $end = substr($a['task_end_date'], 0, 10);