Mercurial > hg > soundsoftware-site
changeset 736:51c97efbe241 feature_318
Small fixes -- avoid troubles when trying to retrive root /hg URL
author | Chris Cannam |
---|---|
date | Fri, 04 Nov 2011 16:32:17 +0000 |
parents | 8653bddf26a6 |
children | 1ce6efe3db0e |
files | extra/soundsoftware/SoundSoftware.pm |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/soundsoftware/SoundSoftware.pm Fri Nov 04 14:51:08 2011 +0000 +++ b/extra/soundsoftware/SoundSoftware.pm Fri Nov 04 16:32:17 2011 +0000 @@ -472,14 +472,13 @@ sub get_project_identifier { my $dbh = shift; my $r = shift; - my $location = $r->location; - my ($repo) = $r->uri =~ m{$location/*([^/]+)}; + my $repo = ($r->uri =~ m{$location/*([^/]+)}); return $repo if (!$repo); $repo =~ s/[^a-zA-Z0-9\._-]//g; - + # The original Redmine.pm returns the string just calculated as # the project identifier. That won't do for us -- we may have # (and in fact already do have, in our test instance) projects @@ -499,7 +498,6 @@ my $prefix = $cfg->{SoundSoftwareRepoPrefix}; if (!defined $prefix) { $prefix = '%/'; } - my $identifier = ''; $sth->execute($prefix . $repo); @@ -548,7 +546,7 @@ # use repo name instead (don't want to admit to user that project # doesn't exist) my $location = $r->location; - my ($repo) = $r->uri =~ m{$location/*([^/]+)}; + my $repo = ($r->uri =~ m{$location/*([^/]+)}); $name = $repo; }