diff --git a/dcd.pl b/dcd.pl index ae52e38a0354b629c5ec33f50e918728aaba218c..46742912c03f4405bfe3e9c09a50bab79ab5a6e9 100755 --- a/dcd.pl +++ b/dcd.pl @@ -177,17 +177,18 @@ sub register_url || $repo_url =~ m#https://(www\.protokollezurbibel\.at)/index\.php/(pzb)/article/view/(\d+)$# || $repo_url =~ m#https://(www\.tde-journal\.org)/index\.php/(tde)/article/view/(\d+)$# || $repo_url =~ m#https://(exfonte\.org)/index\.php/(exf)/article/view/(\d+)$# + || $repo_url =~ m#https://(journalofsocialontology\.org)/index\.php/(jso)/article/view/(\d+)$# # Othes || $repo_url =~ m#https://(othes\.univie\.ac\.at)/(\d+)/$# ) { my ($repo, @parts)= ($1, $2, $3, $4, $5, $6, $7, $8); my $pid; - while (@parts) { $pid= pop (@parts); last if (defined($pid)) }; + while (@parts && !defined($pid)) { $pid= pop (@parts); } - my $journal= (@parts == 1) ? $parts[0] : undef; # ugly hack! + my $journal= (@parts == 1 || @parts == 2) ? $parts[0] : undef; # ugly hack! - print __LINE__, " repo=[$repo] pid=[$pid] parts=[",join('|',@parts),"]\n"; + print __LINE__, " repo=[$repo] journal=[$journal] pid=[$pid] parts=[",join('|',@parts),"]\n"; usage ("unknown repo=[$repo]") unless (exists ($cnf->{repositories}->{$repo})); print __LINE__, " repo=[$repo]\n";