- LSsession : Ajout d'un param├Ętrage global pour 'keepLSsessionActive'.
authorBenjamin Renard <brenard@easter-eggs.com>
Sat, 21 Feb 2009 11:42:26 +0000 (11:42 +0000)
committerBenjamin Renard <brenard@easter-eggs.com>
Sat, 21 Feb 2009 11:42:26 +0000 (11:42 +0000)
trunk/conf/config.inc.php
trunk/includes/class/class.LSsession.php

index 7e0b1c3..d489b31 100644 (file)
@@ -28,6 +28,7 @@ $GLOBALS['LSconfig'] = array(
   'cacheLSprofiles' => true,
   'cacheSubDn' => true,
   'cacheSearch' => true,
+  'keepLSsessionActive' => true,
   'ldap_servers' => array (
     array (
       'name' => 'LSexample',
index cfbf7e5..4a353ea 100644 (file)
@@ -1008,7 +1008,19 @@ class LSsession {
       $JSscript_txt.="<script src='".$script['path'].$script['file']."' type='text/javascript'></script>\n";
     }
 
-    if (!isset(self :: $ldapServer['keepLSsessionActive']) || (self :: $ldapServer['keepLSsessionActive'])) {
+    if ( 
+          (
+            (!isset(self :: $ldapServer['keepLSsessionActive']))
+            &&
+            ( 
+              (!isset($GLOBALS['LSconfig']['keepLSsessionActive']))
+              ||
+              ($GLOBALS['LSconfig']['keepLSsessionActive'])
+            )
+          )
+          ||
+          (self :: $ldapServer['keepLSsessionActive'])
+        ) {
       self :: addJSconfigParam('keepLSsessionActive',ini_get('session.gc_maxlifetime'));
     }