5 * Portions Copyright 1999-2001 (c) VA Linux Systems
6 * The rest Copyright 2002-2004 (c) GForge Team
9 * This file is part of GForge.
11 * GForge is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * GForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with GForge; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 require_once('../env.inc.php');
28 require_once $gfwww.'include/pre.php';
29 require_once $gfwww.'include/note.php';
30 require_once $gfcommon.'tracker/Artifact.class.php';
31 require_once $gfcommon.'tracker/ArtifactFile.class.php';
32 require_once $gfwww.'tracker/include/ArtifactFileHtml.class.php';
33 require_once $gfcommon.'tracker/ArtifactType.class.php';
34 require_once $gfwww.'tracker/include/ArtifactTypeHtml.class.php';
35 require_once $gfwww.'tracker/include/ArtifactHtml.class.php';
36 require_once $gfcommon.'tracker/ArtifactCanned.class.php';
37 require_once $gfcommon.'tracker/ArtifactTypeFactory.class.php';
39 if (!forge_get_config('use_tracker')) {
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('Error','Could Not Get Artifact Object');
54 $group_id=$a->ArtifactType->Group->getID();
55 $atid=$a->ArtifactType->getID();
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());
68 exit_error(_('Error'), $group->getErrorMessage());
72 if ($group_id && $atid) {
73 include $gfwww.'tracker/tracker.php';
75 } elseif ($group_id) {
76 include $gfwww.'tracker/ind.php';
82 // c-file-style: "bsd"