Skip to content

Commit

Permalink
fix: correct the link to products added by one user (#8463)
Browse files Browse the repository at this point in the history
fix: product added by user url #8421
  • Loading branch information
stephanegigandet authored May 29, 2023
1 parent 0442a1e commit 65d99c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion lib/ProductOpener/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3904,7 +3904,7 @@ HTML
$user_template_data_ref->{links} = [
{
text => sprintf(lang('contributors_products'), $products_title),
url => canonicalize_tag_link("contributors", get_string_id_for_lang("no_language", $tagid)),
url => canonicalize_tag_link("users", get_string_id_for_lang("no_language", $tagid)),
},
{
text => sprintf(lang('editors_products'), $products_title),
Expand Down
13 changes: 0 additions & 13 deletions lib/ProductOpener/Tags.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3992,11 +3992,8 @@ sub canonicalize_tag_link ($tagtype, $tagid) {
die "ERROR: canonicalize_tag_link called for a taxonomy tagtype: $tagtype - tagid: $tagid - $!";
}

my $tag_lc = $lc;

if ($tagtype eq 'missions') {
if ($tagid =~ /\./) {
$tag_lc = $`;
$tagid = $';
}
}
Expand All @@ -4008,19 +4005,9 @@ sub canonicalize_tag_link ($tagtype, $tagid) {

my $link = "/$path/" . URI::Escape::XS::encodeURIComponent($tagid);

#if ($tag_lc ne $lc) {
# my $test = '';
# if ($data_root =~ /-test/) {
# $test = "-test";
# }
# $link = "http://" . $tag_lc . $test . "." . $server_domain . $link;
#}

#print STDERR "tagtype: $tagtype - $lc: $lc - lang: $lang - link: $link\n";
$log->info("canonicalize_tag_link $tagtype $tagid $path $link") if $log->is_info();

return $link;

}

sub export_tags_hierarchy ($lc, $tagtype) {
Expand Down

0 comments on commit 65d99c5

Please sign in to comment.