import('ttTeamHelper');
// Access check.
-if (!ttAccessCheck(right_view_charts) || !$user->isPluginEnabled('ch')) {
+if (!ttAccessAllowed('view_own_charts') || !$user->isPluginEnabled('ch')) {
header('Location: access_denied.php');
exit();
}
// 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) {