[Fusionforge-commits] FusionForge branch Branch_5_2 updated. ec96dd0143345b7ef7233381592ccff3c66bad38

Thorsten Glaser mirabilos at fusionforge.org
Thu Jul 18 09:55:07 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_2 has been updated
       via  ec96dd0143345b7ef7233381592ccff3c66bad38 (commit)
      from  3c7c37cbf6266c09503ecfd574675f2b3778a5ea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ec96dd0143345b7ef7233381592ccff3c66bad38
Author: Thorsten Glaser <t.glaser at tarent.de>
Date:   Thu Jul 18 09:53:48 2013 +0200

    add “project home” link to gitweb pages, to link back to the forge
    
    this makes navigating easier if you don’t frame gitweb
    taken from Evolvis

diff --git a/src/plugins/scmgit/common/GitPlugin.class.php b/src/plugins/scmgit/common/GitPlugin.class.php
index 639b4d8..76d626a 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -5,7 +5,8 @@
  * Copyright 2009, Roland Mas
  * Copyright 2009, Mehdi Dogguy <mehdi at debian.org>
  * Copyright 2012, Franck Villaume - TrivialDev
- * http://fusionforge.org
+ * Copyright © 2013
+ *	Thorsten Glaser <t.glaser at tarent.de>
  *
  * This file is part of FusionForge.
  *
@@ -446,6 +447,9 @@ class GitPlugin extends SCMPlugin {
 		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) ;
diff --git a/src/plugins/scmgit/www/index.php b/src/plugins/scmgit/www/index.php
index 794e207..a4d9e91 100644
--- a/src/plugins/scmgit/www/index.php
+++ b/src/plugins/scmgit/www/index.php
@@ -1,9 +1,26 @@
 <?php
-
-/*
+/*-
  * scmgit plugin
  *
  * Copyright 2010, Roland Mas <lolando at debian.org>
+ * Copyright © 2012
+ *	Thorsten Glaser <t.glaser at 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');
@@ -11,6 +28,19 @@ require_once $gfcommon.'include/pre.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') ;

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/scmgit/common/GitPlugin.class.php |    6 ++++-
 src/plugins/scmgit/www/index.php              |   34 +++++++++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list