<?php
-/** FusionForge Bazaar plugin
+/**
+ * FusionForge Bazaar plugin
*
* Copyright 2009, Roland Mas
+ * Copyright 2013, Franck Villaume - TrivialDev
*
* This file is part of FusionForge.
*
return false ;
}
- if ($project->usesPlugin($this->name)) {
+ if ($project->usesPlugin($this->name) && forge_check_perm('scm', $project->getID(), 'read')) {
$result = db_query_params('SELECT sum(commits) AS commits, sum(adds) AS adds FROM stats_cvs_group WHERE group_id=$1',
array ($project->getID())) ;
$commit_num = db_result($result,0,'commits');
$line = fgets ($pipe) ;
fclose ($pipe) ;
- if (preg_match ("/^Shared repository/", $line) != 0) {
+ if (preg_match ("/^Shared repository/", $line) != 0
+ || preg_match ("/^Repository branch/", $line) != 0) {
$repo_exists = true ;
}
}
// mode: php
// c-file-style: "bsd"
// End:
-
-?>