SCMPlugin () ; $this->name = 'scmcpold'; $this->text = 'CPOLD'; require_once $gfconfig.'plugins/scmcpold/config.php' ; $this->default_cpold_server = $default_cpold_server ; $this->enabled_by_default = $enabled_by_default ; $this->cpold_root = $cpold_root; $this->register () ; } function getDefaultServer() { return $this->default_cpold_server ; } function getBlurb () { return _('

This CPOLD plugin is only intended as a proof of concept.

') ; } function getInstructionsForAnon ($project) { $b = _('

Anonymous CPOLD Access

This project\'s CPOLD repository cannot be anonymously checked out yet.

'); return $b ; } function getInstructionsForRW ($project) { $b = _('

Developer CPOLD Access via SSH

Only project developers can access the CPOLD tree via this method. SSH must be installed on your client machine. Substitute developername with the proper values. Enter your site password when prompted.

'); $b .= '

scp -r '._('developername').'@' . $project->getSCMBox() . ':'. $this->cpold_root .'/'. $project->getUnixName().'/ .

' ; return $b ; } function getStats ($params) { $group_id = $params['group_id'] ; $project =& group_get_object($group_id); if (!$project || !is_object($project)) { return false; } elseif ($project->isError()) { return false; } if ($project->usesPlugin ($this->name)) { echo ' (CPOLD)'; } } function getDetailedStats ($params) { return ; } function createOrUpdateRepo ($params) { $group_id = $params['group_id'] ; $project =& group_get_object($group_id); if (!$project || !is_object($project)) { return false; } elseif ($project->isError()) { return false; } if (! $project->usesPlugin ($this->name)) { return false; } $repo = $this->cpold_root . '/' . $project->getUnixName() ; $unix_group = 'scm_' . $project->getUnixName() ; system ("chgrp -R $unix_group $repo") ; if ($project->enableAnonSCM()) { system ("chmod -R g+wXs,o+rX-w $repo") ; } else { system ("chmod -R g+wXs,o-rwx $repo") ; } } } // Local Variables: // mode: php // c-file-style: "bsd" // End: ?>