function printShortStats ($params) {
$project = $this->checkParams($params);
if (!$project) {
- return false;
+ return;
}
if ($project->usesPlugin($this->name)) {
function printBrowserPage($params) {
$project = $this->checkParams($params);
if (!$project) {
- return false;
+ return;
}
if ($project->usesPlugin($this->name)) {
"$main_repo/hooks/post-update");
}
if (!is_file("$main_repo/hooks/post-update")) {
- $f = fopen("$main_repo/hooks/post-update");
+ $f = fopen("$main_repo/hooks/post-update", 'w');
fwrite($f, "exec git-update-server-info\n");
fclose($f);
}
"$repodir/hooks/post-update") ;
}
if (!is_file ("$repodir/hooks/post-update")) {
- $f = fopen ("$repodir/hooks/post-update") ;
+ $f = fopen ("$repodir/hooks/post-update", 'w') ;
fwrite ($f, "exec git-update-server-info\n") ;
fclose ($f) ;
}
// Author line
$last_user = $matches['name'];
$user2email[$last_user] = strtolower($matches['mail']);
+ if (!isset($usr_adds[$last_user])) {
+ $usr_adds[$last_user] = 0;
+ $usr_updates[$last_user] = 0;
+ $usr_deletes[$last_user] = 0;
+ }
} else {
// Short-commit stats line
preg_match("/^(?P<mode>[AM])\s+(?P<file>.+)$/", $line, $matches);
* @return boolean
*/
function widgets($params) {
- require_once 'common/widget/WidgetLayoutManager.class.php';
+ require_once 'common/widget/WidgetLayoutManager.class.php';
if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_GROUP) {
$params['fusionforge_widgets'][] = 'plugin_scmgit_project_latestcommits';
}