X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=charts.php;h=9df70d55e96ae057fb7bd11d0ede32741720bf5a;hb=ae00c14ac2999773e17a761542932cb95420430a;hp=9dec840aed24effabaa760455d674fc505426b17;hpb=0dfc4dda20c54e173938eaf196f8e071ce790830;p=timetracker.git diff --git a/charts.php b/charts.php index 9dec840a..9df70d55 100644 --- a/charts.php +++ b/charts.php @@ -38,7 +38,7 @@ import('ttUserHelper'); import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_view_charts)) { +if (!ttAccessAllowed('view_own_charts') || !$user->isPluginEnabled('ch')) { header('Location: access_denied.php'); exit(); } @@ -84,7 +84,7 @@ $_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)); -if ($request->getMethod( )== 'POST') { +if ($request->isPost()) { // If chart interval changed - save it. $cl_interval = $request->getParameter('interval'); if ($cl_interval) { @@ -139,10 +139,10 @@ if ($user->canManageTeam()) { // Chart interval options. $intervals = array(); -$intervals[INTERVAL_THIS_DAY] = $i18n->getKey('dropdown.this_day'); -$intervals[INTERVAL_THIS_WEEK] = $i18n->getKey('dropdown.this_week'); -$intervals[INTERVAL_THIS_MONTH] = $i18n->getKey('dropdown.this_month'); -$intervals[INTERVAL_THIS_YEAR] = $i18n->getKey('dropdown.this_year'); +$intervals[INTERVAL_THIS_DAY] = $i18n->getKey('dropdown.selected_day'); +$intervals[INTERVAL_THIS_WEEK] = $i18n->getKey('dropdown.selected_week'); +$intervals[INTERVAL_THIS_MONTH] = $i18n->getKey('dropdown.selected_month'); +$intervals[INTERVAL_THIS_YEAR] = $i18n->getKey('dropdown.selected_year'); $intervals[INTERVAL_ALL_TIME] = $i18n->getKey('dropdown.all_time'); // Chart interval dropdown.