PDA

View Full Version : Changes in config.php not reflected?


rwilson
13-06-04, 04:04 PM
I made the following changes in config.php to show SAT-WED working days, but it is not reflected in Gantt:

$dPconfig["cal_working_days"] = "6,0,1,2,3"

OR

$dPconfig["cal_working_days"] = "0,1,2,3,6"

Any help please?

Revelation7
15-06-04, 02:47 AM
This is due to gantt chart is an integrated module and somethings were not integrated. :D

in modules/tasks/gantt.php around line 129 or so, you see $graph = new GanttGraph($width); which is where it is creating a new graph, right below it, you can add this line $graph->scale->SetWeekStart(6); that will set your gantt chart start of week to Saturday, I don't know how to set the end of the week to be Wednesday, i am not sure if you can.

I tried to make it more robust by using $graph->scale->SetWeekStart(array_pop($dPconfig['cal_working_days '])); so it will look up values from config.php, but can't get it to work, anyone see what i am doing wrong?

ajdonnison
15-06-04, 09:11 AM
cal_working_days is not an array, so array_pop will not work. You would first need to make it an array, something like:

$weekdays = explode(",", $dPconfig['cal_working_days']);
$graph->scale->SetWeekStart($weekdays[0]);