From b0de7fe3a06958d87c3d4ea32b982332eb2f4461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Thu, 22 May 2014 07:48:47 +0000 Subject: [PATCH] Default values are now centralized (#686) --- .../NG/Handler/Initialization/GlobalInit.pm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/GlobalInit.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/GlobalInit.pm index 5d23e4a4f..232259c30 100755 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/GlobalInit.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Initialization/GlobalInit.pm @@ -79,16 +79,14 @@ sub defaultValuesInit { } } - # Warning: first start of handler load values from MyHanlder.pm - # and lemonldap-ng.ini - # These values should be erased by global configuration! - $cookieName = $args->{cookieName} || $cookieName || 'lemonldap'; + # Default values are defined in Common::Conf::Attributes + # These values should be erased by global configuration + $cookieName = $args->{cookieName} || $cookieName; $securedCookie = - defined( $args->{securedCookie} ) ? $args->{securedCookie} - : defined($securedCookie) ? $securedCookie - : 1; - $whatToTrace = $args->{whatToTrace} || $whatToTrace || 'uid'; - $whatToTrace =~ s/\$//g; + defined( $args->{securedCookie} ) + ? $args->{securedCookie} + : $securedCookie; + $whatToTrace = $args->{whatToTrace} || $whatToTrace; $https = defined($https) ? $https : $args->{https}; $port ||= $args->{port}; $customFunctions = $args->{customFunctions}; @@ -96,7 +94,7 @@ sub defaultValuesInit { $cda = defined($cda) ? $cda : $args->{cda}; $httpOnly = defined($httpOnly) ? $httpOnly : $args->{httpOnly}; $cookieExpiration = $args->{cookieExpiration} || $cookieExpiration; - $timeoutActivity = $args->{timeoutActivity} || $timeoutActivity || 0; + $timeoutActivity = $args->{timeoutActivity} || $timeoutActivity; $useRedirectOnError = defined($useRedirectOnError) ? $useRedirectOnError