Bug 35463: perltidy formatting corrections

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Caroline Cyr La Rose 2023-12-04 17:37:39 -05:00 committed by Katrin Fischer
parent d20410a1cc
commit 81212d0015
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -308,23 +308,23 @@ our $mapping = {
sub get_url {
my ( $url, $preferred_language ) = @_;
my $file;
if ($url =~ /koha\/(.*)\.pl/ || $url =~ '/koha/(erm.*)' || $url =~ '/koha/(preservation.*)') {
if ( $url =~ /koha\/(.*)\.pl/ || $url =~ '/koha/(erm.*)' || $url =~ '/koha/(preservation.*)' ) {
$file = $1;
} else {
$file = 'mainpage';
}
$file =~ s/[^a-zA-Z0-9_\-\/]*//g;
if ( $file =~ m|^erm| || $file =~ m|^preservation|) {
if ( $file =~ m|^erm| || $file =~ m|^preservation| ) {
$file =~ s|\d*+||g;
}
my $view;
if ($url =~ /(?:\?|\&)tab=(?<value>[\w+,.-]*)/) {
if ( $url =~ /(?:\?|\&)tab=(?<value>[\w+,.-]*)/ ) {
$view = $file . '#' . $+{value};
}
my $base_url = _get_base_url( $preferred_language );
my $base_url = _get_base_url($preferred_language);
return $base_url
. (
exists $mapping->{$view} ? $mapping->{$view}