X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=charts.php;h=9dec840aed24effabaa760455d674fc505426b17;hb=da25ca5669ac88985d37a68392ed736ac03dcc3c;hp=0883450806c534b75b66dd5a0bf3958657989e8c;hpb=70272dc970919c348288bd09ff835f05e7538949;p=timetracker.git diff --git a/charts.php b/charts.php index 08834508..9dec840a 100644 --- a/charts.php +++ b/charts.php @@ -67,11 +67,11 @@ 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; } elseif ($cl_type == CHART_TASKS) { if (MODE_PROJECTS_AND_TASKS != $user->tracking_mode) @@ -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.