# HG changeset patch # User Chris Cannam # Date 1320424337 0 # Node ID 51c97efbe241853386c26d4d771670c96e145449 # Parent 8653bddf26a6587843ed7359d57671e0b3a0795a Small fixes -- avoid troubles when trying to retrive root /hg URL diff -r 8653bddf26a6 -r 51c97efbe241 extra/soundsoftware/SoundSoftware.pm --- 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; }