Revision 736:51c97efbe241 extra/soundsoftware
| extra/soundsoftware/SoundSoftware.pm | ||
|---|---|---|
| 472 | 472 |
sub get_project_identifier {
|
| 473 | 473 |
my $dbh = shift; |
| 474 | 474 |
my $r = shift; |
| 475 |
|
|
| 476 | 475 |
my $location = $r->location; |
| 477 |
my ($repo) = $r->uri =~ m{$location/*([^/]+)};
|
|
| 476 |
my $repo = ($r->uri =~ m{$location/*([^/]+)});
|
|
| 478 | 477 |
|
| 479 | 478 |
return $repo if (!$repo); |
| 480 | 479 |
|
| 481 | 480 |
$repo =~ s/[^a-zA-Z0-9\._-]//g; |
| 482 |
|
|
| 481 |
|
|
| 483 | 482 |
# The original Redmine.pm returns the string just calculated as |
| 484 | 483 |
# the project identifier. That won't do for us -- we may have |
| 485 | 484 |
# (and in fact already do have, in our test instance) projects |
| ... | ... | |
| 499 | 498 |
|
| 500 | 499 |
my $prefix = $cfg->{SoundSoftwareRepoPrefix};
|
| 501 | 500 |
if (!defined $prefix) { $prefix = '%/'; }
|
| 502 |
|
|
| 503 | 501 |
my $identifier = ''; |
| 504 | 502 |
|
| 505 | 503 |
$sth->execute($prefix . $repo); |
| ... | ... | |
| 548 | 546 |
# use repo name instead (don't want to admit to user that project |
| 549 | 547 |
# doesn't exist) |
| 550 | 548 |
my $location = $r->location; |
| 551 |
my ($repo) = $r->uri =~ m{$location/*([^/]+)};
|
|
| 549 |
my $repo = ($r->uri =~ m{$location/*([^/]+)});
|
|
| 552 | 550 |
$name = $repo; |
| 553 | 551 |
} |
| 554 | 552 |
|
Also available in: Unified diff