Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct the link to products added by one user #8463

Merged
merged 1 commit into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading