-// Initialize chart interval.
-$cl_interval = $_SESSION['chart_interval'];
-if (!$cl_interval) {
- $uc = new ttUserConfig();
- $cl_interval = $uc->getValue(SYSC_CHART_INTERVAL);
-}
-if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH;
-$_SESSION['chart_interval'] = $cl_interval;
-
-// Initialize chart type.
-$cl_type = $_SESSION['chart_type'];
-if (!$cl_type) {
- $uc = new ttUserConfig();
- $cl_type = $uc->getValue(SYSC_CHART_TYPE);
-}
-if (MODE_TIME == $user->getTrackingMode()) {
- if ($user->isPluginEnabled('cl'))
- $cl_type = CHART_CLIENTS;
-} else {
- if ($cl_type == CHART_CLIENTS) {
- if (!$user->isPluginEnabled('cl'))
- $cl_type = CHART_PROJECTS;
- } elseif ($cl_type == CHART_TASKS) {
- if (MODE_PROJECTS_AND_TASKS != $user->getTrackingMode())
- $cl_type = CHART_PROJECTS;
- }
-}
-if (!$cl_type) $cl_type = CHART_PROJECTS;
-$_SESSION['chart_type'] = $cl_type;
-
-// Who do we draw charts for?
-$on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id));
-