5 * Copyright 2004 (c) GForge LLC
7 * @author Tim Perdue tim@gforge.org
10 * This file is part of GForge.
12 * GForge is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * GForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with GForge; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 function scm_header($params) {
28 global $HTML, $sys_use_scm;
33 $project =& group_get_object($params['group']);
34 if (!$project || !is_object($project)) {
35 exit_error('Error','Could Not Get Project');
36 } elseif ($project->isError()) {
37 exit_error('Error',$project->getErrorMessage());
40 if (!$project->usesSCM()) {
41 exit_error('Error',_('Error - This project has turned off SCM.'));
43 site_project_header(array('title'=>_('SCM Repository'),'group'=>$params['group'],'toptab'=>'scm',));
47 if (session_loggedin()) {
48 $perm =& $project->getPermission(session_get_user());
49 if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
57 '/scm/?group_id='.$params['group'],
58 '/scm/admin/?group_id='.$params['group'],
59 '/scm/reporting/?group_id='.$params['group']
64 echo '<div style="width:99%">';
67 function scm_footer() {
69 site_project_footer(array());
74 // c-file-style: "bsd"