SCM () ; $this->name = 'scmcvs'; $this->text = 'CVS'; $this->hooks[] = 'scm_page'; $this->hooks[] = 'scm_admin_update'; $this->hooks[] = 'scm_admin_page'; $this->hooks[] = 'scm_stats'; $this->hooks[] = 'scm_createrepo' ; $this->hooks[] = 'scm_snapshots_and_tarballs' ; $this->hooks[] = 'scm_plugin'; require_once $GLOBALS['gfconfig'].'plugins/scmcvs/config.php' ; $this->default_cvs_server = $default_cvs_server ; if ($cvs_root) { $this->cvs_root = $cvs_root; } else { $this->cvs_root = "/cvsroot"; } //$this->default_cvs_server = $default_cvs_server ; //$this->this_server = $this_server ; $this->enabled_by_default = $enabled_by_default ; $this->register () ; } function getDefaultServer() { return $this->default_cvs_server; } function CallHook ($hookname, $params) { global $HTML; switch ($hookname) { case 'scm_page': $group_id = $params['group_id'] ; $this->getPage ($group_id) ; break ; case 'scm_admin_update': $this->adminUpdate ($params) ; break ; case 'scm_admin_page': $this->getAdminPage ($params) ; break ; case 'scm_stats': $this->getStats ($params) ; break; case 'scm_createrepo': $this->createOrUpdateRepo ($params) ; break; case 'scm_snapshots_and_tarballs': $this->generateSnapshots ($params) ; break; case 'scm_plugin': $scm_plugins=& $params['scm_plugins']; $scm_plugins[]=$this->name; break; default: // Forgot something } } function getPage ($group_id) { global $HTML ; $project =& group_get_object($group_id); if (!$project || !is_object($project)) { return false; } elseif ($project->isError()) { return false; } if ($project->usesPlugin($this->name)) { print _('Some CVS documentation is available Here'); $cvsrootend=$project->getSCMBox().':/cvsroot/'.$project->getUnixName(); $cvsrootend = $project->getSCMBox().':'.$this->cvs_root.'/'.$project->getUnixName(); // Table for summary info print '
' ;
// Anonymous CVS Instructions
if ($project->enableAnonSCM()){
echo _(' Anonymous CVS Access This project\'s CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, simply press the Enter key. '); print '
cvs -d :pserver:anonymous@' . $cvsrootend.' login Developer CVS Access via SSH Only project developers can access the CVS tree via this method. SSH must be installed on your client machine. Substitute modulename with the proper value. Enter your site password when prompted. '); print '
export CVS_RSH=ssh Developer CVS Access via SSH Only project developers can access the CVS tree via this method. SSH must be installed on your client machine. Substitute modulename and developername with the proper values. Enter your site password when prompted. '); print '
export CVS_RSH=ssh [' ; print util_make_link ("/snapshots.php?group_id=$group_id", _('Download The Nightly CVS Tree Snapshot') ) ; print '] '; } print ' | ' ;
// CVS Browsing
echo $HTML->boxTop(_('Repository History'));
echo $this->getDetailedStats(array('group_id'=>$group_id)).' '; if ($this->browserDisplayable ($project)) { echo _('Browse the CVS Tree Browsing the CVS tree gives you a great view into the current status of this project\'s code. You may also view the complete histories of any file in the repository. '); echo '[' ; echo util_make_link ("/scm/viewvc.php/?root=".$project->getUnixName(), _('Browse CVS Repository') ) ; echo '] ' ; $hook_params['project_name'] = $project->getUnixName(); plugin_hook ("cvs_stats", $hook_params) ; } echo $HTML->boxBottom(); print ' |
';
if ($group->isPublic()) {
print 'c($group->enableAnonSCM()).'/>'._('Enable Anonymous Access').'
';
} else {
print 'c($group->enableAnonSCM()).' DISABLED/>'._('Enable Anonymous Access').' '._("You project is private and so, you can't turn Anonymous Access on").'
';
}
print 'c($group->enablePserver()).' />'._('Enable pserver').'