projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bit more work in progress on project attachments.
[timetracker.git]
/
project_files.php
diff --git
a/project_files.php
b/project_files.php
index
baec9aa
..
b069acb
100644
(file)
--- a/
project_files.php
+++ b/
project_files.php
@@
-27,8
+27,7
@@
// +----------------------------------------------------------------------+
require_once('initialize.php');
// +----------------------------------------------------------------------+
require_once('initialize.php');
-import('form.Form');
-import('ttGroupHelper');
+import('ttProjectHelper');
// Access checks.
if (!(ttAccessAllowed('view_own_projects') || ttAccessAllowed('manage_projects'))) {
// 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();
}
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.
// 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('title', $i18n->get('title.project_files'));
-$smarty->assign('content_page_name', 'projects.tpl');
+$smarty->assign('content_page_name', 'project
_file
s.tpl');
$smarty->display('index.tpl');
$smarty->display('index.tpl');