* Copyright 2009, Roland Mas
* Copyright 2009, Mehdi Dogguy <mehdi@debian.org>
* Copyright 2012-2013, Franck Villaume - TrivialDev
+ * Copyright © 2013
+ * Thorsten Glaser <t.glaser@tarent.de>
* http://fusionforge.org
*
* This file is part of FusionForge.
}
function getBlurb() {
- return '<p>' . _('Documentation for Git is available at <a href="http://git-scm.com/">http://git-scm.com/</a>.') . '</p>';
+ return '<p>'
+ . sprintf(_('Documentation for %1$s is available at <a href="%2$s">%2$s</a>.'),
+ 'Git',
+ 'http://git-scm.com/')
+ . '</p>';
}
function getInstructionsForAnon($project) {
} else {
$unix_group = forge_get_config('apache_group');
}
+ system ("chgrp $unix_group $root") ;
// Create main repository
$main_repo = $root . '/' . $project_name . '.git' ;
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);
$repo = forge_get_config('repos_path', 'scmgit') . '/' . $project->getUnixName() . '/' . $project->getUnixName() . '.git';
if (!is_dir ($repo) || !is_dir ("$repo/refs")) {
- // echo "No repository\n" ;
+ // echo "No repository $repo\n" ;
return false ;
}
// Short-commit stats line
preg_match("/^(?P<mode>[AM])\s+(?P<file>.+)$/", $line, $matches);
if ($last_user == "") continue;
+ if (!isset ($usr_adds[$last_user])) $usr_adds[$last_user] = 0;
+ if (!isset ($usr_updates[$last_user])) $usr_updates[$last_user] = 0;
+ if (!isset ($usr_deletes[$last_user])) $usr_deletes[$last_user] = 0;
if ($matches['mode'] == 'A') {
$usr_adds[$last_user]++;
$adds++;
}
}
- $uu = $usr_updates[$user] ? $usr_updates[$user] : 0 ;
- $ua = $usr_adds[$user] ? $usr_adds[$user] : 0 ;
+ $uu = isset ($usr_updates[$user]) ? $usr_updates[$user] : 0 ;
+ $ua = isset ($usr_adds[$user]) ? $usr_adds[$user] : 0 ;
if ($uu > 0 || $ua > 0) {
if (!db_query_params ('INSERT INTO stats_cvs_user (month,day,group_id,user_id,commits,adds) VALUES ($1,$2,$3,$4,$5,$6)',
array ($month_string,