X-Git-Url: https://scm.fusionforge.org/anonscm/gitweb?p=fusionforge%2Ffusionforge.git;a=blobdiff_plain;f=src%2Fplugins%2Fscmcvs%2Fcommon%2FCVSPlugin.class.php;h=181b4b238775f6ac11cea1da113ba72af431a442;hp=155d7fb7fd4019a2e190e044deec7dba798a2412;hb=843ccaa9f4fd56870b51c1dbcdc3f860971714c4;hpb=6d2bac6822ae36a9f50ea5bc7b007e84f6e8ae76 diff --git a/src/plugins/scmcvs/common/CVSPlugin.class.php b/src/plugins/scmcvs/common/CVSPlugin.class.php index 155d7fb..181b4b2 100644 --- a/src/plugins/scmcvs/common/CVSPlugin.class.php +++ b/src/plugins/scmcvs/common/CVSPlugin.class.php @@ -1,7 +1,9 @@ checkParams ($params) ; if (!$project) { - return false ; + return; } - 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'); @@ -66,7 +68,11 @@ class CVSPlugin extends SCMPlugin { } function getBlurb () { - return '
' . _('CVS documentation is available here.') . '
'; + return '' + . sprintf(_('Documentation for %1$s is available at %2$s.'), + 'CVS', + 'http://cvsbook.red-bean.com/') + . '
'; } function getInstructionsForAnon ($project) { @@ -88,18 +94,34 @@ class CVSPlugin extends SCMPlugin { if (session_loggedin()) { $u =& user_get_object(user_getid()) ; $d = $u->getUnixName() ; - $b = ''; - $b .= _('Only project developers can access the CVS tree via this method. SSH must be installed on your client machine. Substitute modulename with the proper values. Enter your site password when prompted.'); + $b .= sprintf(_('Only project developers can access the %s tree via this method.'), 'CVS'); + $b .= ' '; + $b .= _('SSH must be installed on your client machine.'); + $b .= ' '; + $b .= _('Substitute developername with the proper values.'); + $b .= ' '; + $b .= _('Enter your site password when prompted.'); $b .= '
'; $b .= '
export CVS_RSH=ssh
cvs -d :ext:'.$d.'@'.$cvsrootend.' checkout '._('modulename').'
'; - $b .= _('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.'); + $b .= sprintf(_('Only project developers can access the %s tree via this method.'), 'CVS'); + $b .= ' '; + $b .= _('SSH must be installed on your client machine.'); + $b .= ' '; + $b .= _('Substitute developername with the proper values.'); + $b .= ' '; + $b .= _('Enter your site password when prompted.'); $b .= '
'; $b .= '
export CVS_RSH=ssh
@@ -125,13 +147,15 @@ class CVSPlugin extends SCMPlugin {
function getBrowserLinkBlock ($project) {
global $HTML ;
- $b = $HTML->boxMiddle(_('CVS Repository Browser'));
+ $b = $HTML->boxMiddle(sprintf(_('%s Repository Browser'), 'CVS'));
$b .= '
'; - $b .= _('Browsing the CVS tree gives you a view into the current status of this project\'s code. You may also view the complete histories of any file in the repository.'); + $b .= sprintf(_("Browsing the %s tree gives you a view into the current status of this project's code."), 'CVS'); + $b .= ' '; + $b .= _('You may also view the complete histories of any file in the repository.'); $b .= '
'; $b .= '[' ; $b .= util_make_link ("/scm/browser.php?group_id=".$project->getID(), - _('Browse CVS Repository') + sprintf(_('Browse %s Repository'), 'CVS') ) ; $b .= ']
' ; return $b ; @@ -159,18 +183,18 @@ class CVSPlugin extends SCMPlugin { while($data = db_fetch_array($result)) { $b .= '