3 * FusionForge SCM Library
5 * Copyright 2004-2005 (c) GForge LLC, Tim Perdue
6 * Copyright 2010 (c), Franck Villaume
7 * http://fusionforge.org
9 * This file is part of FusionForge.
11 * FusionForge 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 * 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
22 * along with FusionForge; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 function scm_header($params) {
28 if (!forge_get_config('use_scm')) {
32 $project =& group_get_object($params['group']);
33 if (!$project || !is_object($project)) {
35 } elseif ($project->isError()) {
36 exit_error($project->getErrorMessage(),'scm');
39 if (!$project->usesSCM()) {
42 site_project_header(array('title'=>_('SCM Repository'),'group'=>$params['group'],'toptab'=>'scm',));
46 if (session_loggedin()) {
47 if (forge_check_perm ('project_admin', $project->getID())) {
55 '/scm/?group_id='.$params['group'],
56 '/scm/admin/?group_id='.$params['group'],
57 '/scm/reporting/?group_id='.$params['group']
62 echo '<div class="scm">';
65 function scm_footer() {
67 site_project_footer(array());
72 // c-file-style: "bsd"