Ticket #506: 506-jSession-start-switch-in-config-file.diff

File 506-jSession-start-switch-in-config-file.diff, 3.8 kB (added by Julien, 10 months ago)

patch for the trunk and branch 1.0.x

  • trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

    old new  
    145145 
    146146 
    147147[sessions] 
     148; to disable sessions, set the following parameter to 0 
     149start = 1 
    148150; You can change the session name by setting the following parameter (only accepts alpha-numeric chars) : 
    149151; name = "mySessionName" 
    150152; Use alternative storage engines for sessions 
  • trunk/lib/jelix/core/jSession.class.php

    old new  
    2626     */ 
    2727    public static function start(){ 
    2828 
    29         // do not start the session if the request is made from the command line 
    30         if($GLOBALS['gJCoord']->request instanceof jCmdLineRequest){ 
     29        // do not start the session if the request is made from the command line or if sessions are disabled in configuration 
     30        if($GLOBALS['gJCoord']->request instanceof jCmdLineRequest || !$GLOBALS['gJConfig']->sessions['start']){ 
    3131            return false; 
    3232        } 
    3333 
  • trunk/lib/jelix/core/defaultconfig.ini.php

    old new  
    200200enableAclDbEventListener = off 
    201201 
    202202[sessions] 
     203; to disable sessions, set the following parameter to 0 
     204start = 1 
    203205shared_session = off 
    204206; You can change the session name by setting the following parameter (only accepts alpha-numeric chars) : 
    205207; name = "mySessionName" 
  • branches/1.0.x/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

    old new  
    145145 
    146146 
    147147[sessions] 
     148; to disable sessions, set the following parameter to 0 
     149start = 1 
    148150; You can change the session name by setting the following parameter (only accepts alpha-numeric chars) : 
    149151; name = "mySessionName" 
    150152; Use alternative storage engines for sessions 
  • branches/1.0.x/lib/jelix/core/jSession.class.php

    old new  
    2626     */ 
    2727    public static function start(){ 
    2828 
    29         // do not start the session if the request is made from the command line 
    30         if($GLOBALS['gJCoord']->request instanceof jCmdLineRequest){ 
     29        // do not start the session if the request is made from the command line or if sessions are disabled in configuration 
     30        if($GLOBALS['gJCoord']->request instanceof jCmdLineRequest || !$GLOBALS['gJConfig']->sessions['start']){ 
    3131            return false; 
    3232        } 
    3333 
  • branches/1.0.x/lib/jelix/core/defaultconfig.ini.php

    old new  
    200200enableAclDbEventListener = off 
    201201 
    202202[sessions] 
     203; to disable sessions, set the following parameter to 0 
     204start = 1 
    203205shared_session = off 
    204206; You can change the session name by setting the following parameter (only accepts alpha-numeric chars) : 
    205207; name = "mySessionName" 
Download in other formats: Original Format