diff options
author | Yorhel <git@yorhel.nl> | 2019-08-21 12:37:17 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-08-21 12:37:20 +0200 |
commit | 0e5d1bec9717d2f9344e7681465f21ff93706484 (patch) | |
tree | 78473838a057d91afd28ad14639bb71be05258b4 /lib/VNDB/Handler/Releases.pm | |
parent | 04d9ec043e1b74fe421a7a0a7d9e1822d21bd7ff (diff) |
Remove protocol from l_dmm links
It's redundant, and normalization is actually easier when removed.
Diffstat (limited to 'lib/VNDB/Handler/Releases.pm')
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index 4d75ced1..2af90d07 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -71,7 +71,7 @@ sub page { [ l_mg => 'MangaGamer', htmlize => sub { $_[0] ? sprintf qq{<a href="$self->{mg_url}">%1\$d</a>}, $_[0] : '[empty]' } ], [ l_getchu => 'Getchu', htmlize => sub { $_[0] ? sprintf '<a href="http://www.getchu.com/soft.phtml?id=%d">%1$d</a>', $_[0] : '[empty]' } ], [ l_getchudl => 'DL.Getchu', htmlize => sub { $_[0] ? sprintf '<a href="http://dl.getchu.com/i/item%d">%1$d</a>', $_[0] : '[empty]' } ], - [ l_dmm => 'DMM', htmlize => sub { $_[0] ? sprintf '<a href="%s">%1$s</a>', xml_escape $_[0] : '[empty]' } ], + [ l_dmm => 'DMM', htmlize => sub { $_[0] ? sprintf '<a href="https://%s">%1$s</a>', xml_escape $_[0] : '[empty]' } ], [ l_itch => 'Itch.io', htmlize => sub { $_[0] ? sprintf '<a href="https://%s">%1$s</a>', xml_escape $_[0] : '[empty]' } ], [ released => 'Release date', htmlize => \&fmtdatestr ], [ minage => 'Age rating', serialize => \&minage ], @@ -383,10 +383,7 @@ sub edit { $frm->{engine} = $frm->{engine_oth} if $frm->{engine} eq '_other_'; delete $frm->{engine_oth}; - if($frm->{l_dmm}) { - $frm->{l_dmm} =~ s{^http://}{https://}; - $frm->{l_dmm} = "https://$frm->{l_dmm}" if $frm->{l_dmm} !~ /^https:/; - } + $frm->{l_dmm} =~ s{^https?://}{}; $frm->{l_itch} =~ s{^https?://}{}; push @{$frm->{_err}}, [ 'released', 'required', 1 ] if !$frm->{released}; |