3 * FusionForge Projects Redirector
5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2002-2004 (c) GForge Team
7 * Copyright 2010 (c) FusionForge Team
8 * http://fusionforge.org/
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge 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 along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require_once 'env.inc.php';
27 require_once $gfcommon.'include/pre.php';
31 // Setting up the $project object is all being
32 // handled in the logger now
33 // This was done so the logger would accurately record these pages
37 // test to see if the logger was successful in setting up the objects
40 $default_content_type = 'text/html';
42 if (!$group_id || !$project) {
44 $script = 'projects_list';
45 $content_type = util_negociate_alternate_content_types($script, $default_content_type);
47 if($content_type != $default_content_type) {
48 $hook_params = array();
49 $hook_params['accept'] = $content_type;
50 $hook_params['return'] = '';
51 $hook_params['content_type'] = '';
52 plugin_hook_by_reference('content_negociated_projects_list', $hook_params);
53 if($hook_params['content_type'] != ''){
54 header('Content-type: '. $hook_params['content_type']);
55 echo $hook_params['content'];
58 header('HTTP/1.1 406 Not Acceptable',true,406);
65 $subpage = getStringFromRequest('subpage');
67 if ($subpage == "admin") {
68 session_redirect(util_make_url("/project/admin/?group_id=$group_id"));
69 } else if ($subpage == "files" || $subpage == "download" || $subpage == "dl") {
70 if (getStringFromRequest('subpage2') == "release") {
71 session_redirect(util_make_url("/frs/admin/qrs.php?group_id=$group_id"));
73 session_redirect(util_make_url("/frs/?group_id=$group_id"));
75 } else if ($subpage == "cvs") {
76 header("Location: ".account_group_cvsweb_url($project->getUnixName()));
80 $script='project_home';
81 $content_type = util_negociate_alternate_content_types($script, $default_content_type);
83 // if a custom content-type is selected, then redirect to plugin's rendering
84 if($content_type != $default_content_type) {
85 $hook_params = array();
86 $hook_params['groupname'] = $project->getUnixName();
87 $hook_params['accept'] = $content_type;
88 $hook_params['return'] = '';
89 $hook_params['content_type'] = '';
90 $hook_params['group_id'] = $project->getID();
91 plugin_hook_by_reference('content_negociated_project_home', $hook_params);
92 if($hook_params['content_type'] != ''){
93 header('Content-type: '. $hook_params['content_type']);
94 echo $hook_params['content'];
97 header('HTTP/1.1 406 Not Acceptable',true,406);
101 //show the project summary page
102 include $gfwww.'include/project_home.php';
109 // c-file-style: "bsd"