X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/b5b2801290794632bba7af2cdddf9d4a8a96c29c..26dd5629ee5f2c3de36ff44e65529e4ca491cab1:/project_files.php diff --git a/project_files.php b/project_files.php index baec9aa2..b069acb7 100644 --- a/project_files.php +++ b/project_files.php @@ -27,8 +27,7 @@ // +----------------------------------------------------------------------+ require_once('initialize.php'); -import('form.Form'); -import('ttGroupHelper'); +import('ttProjectHelper'); // Access checks. if (!(ttAccessAllowed('view_own_projects') || ttAccessAllowed('manage_projects'))) { @@ -39,17 +38,18 @@ if (MODE_PROJECTS != $user->getTrackingMode() && MODE_PROJECTS_AND_TASKS != $use header('Location: feature_disabled.php'); exit(); } +$cl_project_id = (int)$request->getParameter('id'); +$project = ttProjectHelper::get($cl_project_id); +if (!$project) { + header('Location: access_denied.php'); + exit(); +} // End of access checks. -if($user->can('manage_projects')) { - $active_projects = ttGroupHelper::getActiveProjects(); - $inactive_projects = ttGroupHelper::getInactiveProjects(); -} else - $active_projects = $user->getAssignedProjects(); +$files = null; +// $files = ttAttachmentHelper::getProjectFiles(); -$smarty->assign('active_projects', $active_projects); -$smarty->assign('inactive_projects', $inactive_projects); -$smarty->assign('show_files', $user->isPluginEnabled('at')); +$smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.project_files')); -$smarty->assign('content_page_name', 'projects.tpl'); +$smarty->assign('content_page_name', 'project_files.tpl'); $smarty->display('index.tpl');