~ubuntu-branches/ubuntu/trusty/fusionforge/trusty

« back to all changes in this revision

Viewing changes to plugins/scmcvs/common/CVSPlugin.class.php

  • Committer: Bazaar Package Importer
  • Author(s): Roland Mas
  • Date: 2011-04-15 14:55:34 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110415145534-mvn1nochufjmw177
Tags: 5.0.3-1
New upstream bugfix release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
 
202
202
                $repo = $this->cvs_root . '/' . $project->getUnixName() ;
203
203
                $locks_dir = $this->cvs_root . '/cvs-locks/' . $project->getUnixName() ;
204
 
                $unix_group = 'scm_' . $project->getUnixName() ;
205
204
 
206
205
                $repo_exists = false ;
207
206
                if (is_dir ($repo) && is_dir ("$repo/CVSROOT")) {
213
212
                        system ("mkdir -p $locks_dir") ;
214
213
                }
215
214
 
216
 
                system ("chgrp -R $unix_group $repo $locks_dir") ;
217
 
                system ("chmod 3777 $locks_dir") ;
218
 
                if ($project->enableAnonSCM()) {
219
 
                        system ("chmod -R g+wXs,o+rX-w $repo") ;
 
215
                if ($GLOBALS['sys_use_shell']) {
 
216
                        $unix_group = 'scm_' . $project->getUnixName() ;
 
217
                        system ("chgrp -R $unix_group $repo $locks_dir") ;
 
218
                        system ("chmod 3777 $locks_dir") ;
 
219
                        if ($project->enableAnonSCM()) {
 
220
                                system ("chmod -R g+wXs,o+rX-w $repo") ;
 
221
                        } else {
 
222
                                system ("chmod -R g+wXs,o-rwx $repo") ;
 
223
                        }
220
224
                } else {
221
 
                        system ("chmod -R g+wXs,o-rwx $repo") ;
 
225
                        $unix_user = $GLOBALS['sys_apache_user'];
 
226
                        $unix_group = $GLOBALS['sys_apache_group'];
 
227
                        system ("chown -R $unix_user:$unix_group $repo") ;
 
228
                        system ("chmod -R g-rwx,o-rwx $repo") ;
222
229
                }
223
230
        }
224
231
 
383
390
                }
384
391
 
385
392
                if (! $project->enableAnonSCM()) {
386
 
                        unlink ($snapshot) ;
387
 
                        unlink ($tarball) ;
 
393
                        if (file_exists($snapshot)) unlink ($snapshot) ;
 
394
                        if (file_exists($tarball))  unlink ($tarball) ;
388
395
                        return false;
389
396
                }
390
397
 
397
404
                }
398
405
                
399
406
                if (!$repo_exists) {
400
 
                        unlink ($snapshot) ;
401
 
                        unlink ($tarball) ;
 
407
                        if (file_exists($snapshot)) unlink ($snapshot) ;
 
408
                        if (file_exists($tarball))  unlink ($tarball) ;
402
409
                        return false ;
403
410
                }
404
411