[Fusionforge-commits] FusionForge branch master updated. 17c302b469792d3b546e21fcbab0a4afd63275b2

Roland Mas lolando at fusionforge.org
Thu Jul 18 10:10:02 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, master has been updated
       via  17c302b469792d3b546e21fcbab0a4afd63275b2 (commit)
       via  2d249ee432aa9b05b90e24de6ad681e48974ab66 (commit)
       via  ec96dd0143345b7ef7233381592ccff3c66bad38 (commit)
      from  43f9697dbc726a9d9a7e1dfe88e9b61c1984d51b (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 17c302b469792d3b546e21fcbab0a4afd63275b2
Merge: 43f9697 2d249ee
Author: Roland Mas <lolando at debian.org>
Date:   Thu Jul 18 10:09:32 2013 +0200

    Merged from 5.2

diff --cc src/plugins/scmgit/common/GitPlugin.class.php
index 20b92d4,76d626a..530033e
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@@ -4,8 -4,9 +4,10 @@@
   *
   * Copyright 2009, Roland Mas
   * Copyright 2009, Mehdi Dogguy <mehdi at debian.org>
 - * Copyright 2012, Franck Villaume - TrivialDev
 + * Copyright 2012-2013, Franck Villaume - TrivialDev
+  * Copyright © 2013
+  *	Thorsten Glaser <t.glaser at tarent.de>
 + * http://fusionforge.org
   *
   * This file is part of FusionForge.
   *
@@@ -617,31 -447,22 +619,34 @@@ 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) ;
 +		chmod($fname.'.new', 0644);
 +		rename($fname.'.new', $fname);
  
 -		$fname = $config_dir . '/gitweb.list' ;
 +		$fname = $config_dir . '/gitweb.list';
 +		$f = fopen($fname.'.new', 'w');
  
 -		$f = fopen ($fname.'.new', 'w');
 +		$engine = RBACEngine::getInstance();
  		foreach ($list as $project) {
 -                        $repos = $this->getRepositories($rootdir . "/" .  $project->getUnixName());
 -                        foreach ($repos as $repo) {
 -                                $reldir = substr($repo, strlen($rootdir) + 1);
 -			        fwrite($f, $reldir . "\n");
 -                        }
 +			$repos = $this->getRepositories($rootdir . "/" .  $project->getUnixName());
 +			foreach ($repos as $repo) {
 +				$reldir = substr($repo, strlen($rootdir) + 1);
 +				fwrite($f, $reldir . "\n");
 +			}
 +			$users = $engine->getUsersByAllowedAction('scm',$project->getID(),'write');
 +			$password_data = '';
 +			foreach ($users as $user) {
 +				$password_data .= $user->getUnixName().':'.$user->getUnixPasswd()."\n";
 +			}
 +			$faname = forge_get_config('data_path').'/gituser-authfile.'.$project->getUnixName();
 +			$fa = fopen($faname.'.new', 'w');
 +			fwrite($fa, $password_data);
 +			fclose($fa);
 +			chmod($faname.'.new', 0644);
 +			rename($faname.'.new', $faname);
  		}
  		fclose($f);
  		chmod($fname.'.new', 0644);
diff --cc src/plugins/scmgit/www/index.php
index e8d19d1,a4d9e91..57ccd51
--- a/src/plugins/scmgit/www/index.php
+++ b/src/plugins/scmgit/www/index.php
@@@ -4,16 -3,44 +3,47 @@@
   * 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');
 +require_once '../../../www/env.inc.php';
  require_once $gfcommon.'include/pre.php';
  require_once $gfwww.'scm/include/scm_utils.php';
  
 +$plugin = plugin_get_object('scmgit');
 +$plugin_id = $plugin->getID();
 +
  $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:
 .../authcas/packaging/control/301plugin-authcas    |    2 +-
 src/plugins/scmgit/common/GitPlugin.class.php      |    5 +++
 src/plugins/scmgit/www/index.php                   |   34 ++++++++++++++++++--
 3 files changed, 38 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list