return;
}
- if ($project->usesPlugin($this->name)) {
- $iframe_src = '/scm/viewvc.php?root='.$project->getUnixName();
- htmlIframe($iframe_src, array('id'=>'scmcvs_iframe'));
- }
+ $iframe_src = '/scm/viewvc.php?root='.$project->getUnixName();
+ htmlIframe($iframe_src, array('id'=>'scmcvs_iframe'));
}
function createOrUpdateRepo ($params) {
return false ;
}
- if (! $project->usesPlugin ($this->name)) {
- return false;
- }
-
$repo_prefix = forge_get_config('repos_path', 'scmcvs');
if (!is_dir($repo_prefix) && !mkdir($repo_prefix, 0755, true)) {
return false;
}
function gatherStats ($params) {
- $project = $this->checkParams ($params) ;
+ $project = $this->checkParams($params);
if (!$project) {
return false ;
}
- if (! $project->usesPlugin ($this->name)) {
- return false;
- }
-
if ($params['mode'] == 'day') {
db_begin();
if ( ($time_parsed > $day_begin) && ($time_parsed < $day_end) ) {
if ( $type == 'M' ) {
$cvs_commit++;
- if(!isset($usr_commit[$user])) $usr_commit[$user] = 0;
+ if(!isset($usr_commit[$user])) {
+ $usr_commit[$user] = 0;
+ }
$usr_commit[$user]++;
} elseif ( $type == 'A' ) {
$cvs_add++;
- if(!isset($usr_add[$user])) $usr_add[$user] = 0;
+ if(!isset($usr_add[$user])) {
+ $usr_add[$user] = 0;
+ }
$usr_add[$user]++;
} elseif ( $type == 'O' || $type == 'E' ) {
$cvs_co++;
$snapshot = forge_get_config('scm_snapshots_path').'/'.$group_name.'-scm-latest.tar'.util_get_compressed_file_extension();
$tarball = forge_get_config('scm_tarballs_path').'/'.$group_name.'-scmroot.tar'.util_get_compressed_file_extension();
- if (! $project->usesPlugin ($this->name)) {
- return false;
- }
-
if (! $project->enableAnonSCM()) {
- if (file_exists($snapshot)) unlink ($snapshot) ;
- if (file_exists($tarball)) unlink ($tarball) ;
+ if (file_exists($snapshot)) {
+ unlink ($snapshot) ;
+ }
+ if (file_exists($tarball)) {
+ unlink ($tarball) ;
+ }
return false;
}
}
if (!$repo_exists) {
- if (file_exists($snapshot)) unlink ($snapshot) ;
- if (file_exists($tarball)) unlink ($tarball) ;
+ if (file_exists($snapshot)) {
+ unlink ($snapshot) ;
+ }
+ if (file_exists($tarball)) {
+ unlink ($tarball) ;
+ }
return false ;
}