* Copyright 2009, Roland Mas
* Copyright 2009, Mehdi Dogguy <mehdi@debian.org>
* Copyright 2012, Franck Villaume - TrivialDev
- * http://fusionforge.org
+ * Copyright © 2013
+ * Thorsten Glaser <t.glaser@tarent.de>
*
* This file is part of FusionForge.
*
fwrite($config_f, "\$stylesheet = '". util_make_url('/plugins/scmgit/gitweb.css')."';\n");
fwrite($config_f, "\$javascript = '". util_make_url('/plugins/scmgit/gitweb.js')."';\n");
fwrite($config_f, "\$prevent_xss = 'true';\n");
+ fwrite($config_f, "\$feature{'actions'}{'default'} = [('project home', '" .
+ util_make_url('/plugins/scmgit/?func=grouppage/%n') .
+ "', 'summary')];\n");
fclose($config_f);
chmod ($fname.'.new', 0644) ;
rename ($fname.'.new', $fname) ;
<?php
-
-/*
+/*-
* scmgit plugin
*
* Copyright 2010, Roland Mas <lolando@debian.org>
+ * Copyright © 2012
+ * Thorsten Glaser <t.glaser@tarent.de>
+ * All rights reserved.
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
require_once ('../../../www/env.inc.php');
require_once $gfwww.'scm/include/scm_utils.php';
$func = getStringFromRequest ('func') ;
+
+$matches = array();
+if (preg_match('!^grouppage/([a-z][-a-z0-9_]+)(/.*)$!', $func, $matches)) {
+ $grp = util_ifsetor($matches[1]);
+ if ($grp) {
+ $grp = group_get_object_by_name($grp);
+ }
+ if ($grp && is_object($grp) && !$grp->isError()) {
+ session_redirect('/projects/' . $grp->getUnixName() . '/');
+ }
+ exit_error(sprintf(_('Cannot locate group for func=%s'), $func), 'scm');
+}
+
switch ($func) {
case 'request-personal-repo':
$group_id = getIntFromRequest ('group_id') ;