From 28caeea3c212ea40ad23220990920a9ecbfc6fe1 Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Tue, 19 Feb 2019 20:10:41 +0100 Subject: [PATCH] Partial revert (#1595) --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm index 7f3bcc60d..e278c16ff 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm @@ -97,14 +97,16 @@ sub init { ); # Load override messages from file and lemonldap-ng.ini - if ( $self->{localConfig}->{translations} and -f $self->{localConfig}->{translations} and -r $self->{localConfig}->{translations} ) { + if ( $self->{localConfig}->{translations} + and -r $self->{localConfig}->{translations} ) + { open my $tr_file, '<', $self->{localConfig}->{translations} or die "Can't open" . $self->{localConfig}->{translations} . " : $!"; while (<$tr_file>) { chomp; $_ =~ /^([\w_]+)\s+=\s+(.+)$/; - $self->{localConfig}->{ $1 } = $2; + $self->{localConfig}->{$1} = $2; } close $tr_file or die "Can't close $tr_file : $!"; }