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_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_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(); // CVS browser links must be displayed if // project enables anon CVS or if logged-in // user is a member of the group $displayCvsBrowser = $project->enableAnonSCM(); if(session_loggedin()) { $perm =& $project->getPermission(session_get_user()); if ($perm && is_object($perm) && !$perm->isError() && $perm->isMember()) { $displayCvsBrowser = true; } } // ######################## Table for summary info ?>
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 and developername with the proper values. Enter your site password when prompted. '); print '
export CVS_RSH=ssh |
boxTop(_('Repository History'));
echo $this->getDetailedStats(array('group_id'=>$group_id)).' '; if ($displayCvsBrowser){ 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 '' ; $hook_params['project_name'] = $project->getUnixName(); plugin_hook ("cvs_stats", $hook_params) ; } echo $HTML->boxBottom(); ?> |
c($group->enableAnonSCM()); ?> />
c($group->enablePserver()); ?> />