X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=charts.php;h=9dec840aed24effabaa760455d674fc505426b17;hb=11441db31dcbed7b2070e800bcb1b0e6547b86bd;hp=f63911023dd76b651c9c891306463eddf2519425;hpb=eb55e2f8ca3859482a389795e03b45283e14ef36;p=timetracker.git diff --git a/charts.php b/charts.php index f6391102..9dec840a 100644 --- a/charts.php +++ b/charts.php @@ -67,13 +67,13 @@ if (!$cl_type) { $cl_type = $sc->getValue(SYSC_CHART_TYPE); } if (MODE_TIME == $user->tracking_mode) { - if (in_array('cl', explode(',', $user->plugins))) + if ($user->isPluginEnabled('cl')) $cl_type = CHART_CLIENTS; } else { if ($cl_type == CHART_CLIENTS) { - if (!in_array('cl', explode(',', $user->plugins))) + if (!$user->isPluginEnabled('cl')) $cl_type = CHART_PROJECTS; - } else if ($cl_type == CHART_TASKS) { + } elseif ($cl_type == CHART_TASKS) { if (MODE_PROJECTS_AND_TASKS != $user->tracking_mode) $cl_type = CHART_PROJECTS; } @@ -154,15 +154,14 @@ $chart_form->addInput(array('type' => 'combobox', )); // Chart type options. -$chart_selector = (MODE_PROJECTS_AND_TASKS == $user->tracking_mode - || in_array('cl', explode(',', $user->plugins))); +$chart_selector = (MODE_PROJECTS_AND_TASKS == $user->tracking_mode || $user->isPluginEnabled('cl')); if ($chart_selector) { $types = array(); if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) $types[CHART_PROJECTS] = $i18n->getKey('dropdown.projects'); if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) $types[CHART_TASKS] = $i18n->getKey('dropdown.tasks'); - if (in_array('cl', explode(',', $user->plugins))) + if ($user->isPluginEnabled('cl')) $types[CHART_CLIENTS] = $i18n->getKey('dropdown.clients'); // Add chart type dropdown.