5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2002-2004 (c) GForge Team
7 * http://fusionforge.org/
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require_once('../env.inc.php');
27 require_once $gfcommon.'include/pre.php';
28 require_once $gfwww.'include/note.php';
29 require_once $gfcommon.'tracker/Artifact.class.php';
30 require_once $gfcommon.'tracker/ArtifactFile.class.php';
31 require_once $gfcommon.'tracker/include/ArtifactFileHtml.class.php';
32 require_once $gfcommon.'tracker/ArtifactType.class.php';
33 require_once $gfcommon.'tracker/include/ArtifactTypeHtml.class.php';
34 require_once $gfcommon.'tracker/include/ArtifactHtml.class.php';
35 require_once $gfcommon.'tracker/ArtifactCanned.class.php';
36 require_once $gfcommon.'tracker/ArtifactTypeFactory.class.php';
37 require_once $gfcommon.'tracker/include/ArtifactTypeFactoryHtml.class.php';
39 if (!forge_get_config('use_tracker')) {
40 exit_disabled('home');
43 $aid = getIntFromRequest('aid');
44 $group_id = getIntFromRequest('group_id');
45 $atid = getIntFromRequest('atid');
47 //if the ATID and GID are not provided, but
48 //the artifact_id is, then fetch the other vars
49 if ($aid && (!$group_id || !$atid)) {
50 $a =& artifact_get_object($aid);
51 if (!$a || !is_object($a) || $a->isError()) {
52 exit_error(_('Could Not Get Artifact Object'),'tracker');
54 $group_id=$a->ArtifactType->Group->getID();
55 $atid=$a->ArtifactType->getID();
56 session_redirect('/tracker/?func=detail&group_id='.$group_id.'&atid='.$atid.'&aid='.$aid);
60 $group = group_get_object($group_id);
61 if (!$group || !is_object($group)) {
64 if ($group->isError()) {
65 if($group->isPermissionDeniedError()) {
66 exit_permission_denied($group->getErrorMessage(),'tracker');
68 exit_error($group->getErrorMessage(),'tracker');
72 if (getStringFromRequest('rtype') == 'ajax') {
73 include $gfcommon.'tracker/actions/ajax.php';
77 if ($group_id && $atid) {
78 include $gfcommon.'tracker/actions/tracker.php';
80 } elseif ($group_id) {
81 include $gfcommon.'tracker/actions/ind.php';
87 // c-file-style: "bsd"