Changeset 1077
- Timestamp:
- 09/06/08 15:55:06 (4 months ago)
- Files:
-
- trunk/build/manifests/jelix-no-opt.mn (modified) (1 diff)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (1 diff)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jSession.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/manifests/jelix-no-opt.mn
r1074 r1077 21 21 * jSelector.class.php 22 22 * jUrl.class.php 23 jSession.class.php23 * jSession.class.php 24 24 25 25 cd lib/jelix/core/selector trunk/lib/jelix/core/defaultconfig.ini.php
r1076 r1077 234 234 ; You can change the session name by setting the following parameter (only accepts alpha-numeric chars) : 235 235 ; name = "mySessionName" 236 237 name= 238 236 239 ; 237 240 ; Use alternative storage engines for sessions 238 ; 239 ; usage : 241 ; empty value means the default storage engine of PHP 242 storage= 243 244 ; some additionnal options can be set, depending of the type of storage engine 240 245 ; 241 246 ; storage = "files" trunk/lib/jelix/core/jCoordinator.class.php
r1076 r1077 137 137 jSession::start(); 138 138 139 $this->moduleName = $ this->request->getParam('module');140 $this->actionName = $ this->request->getParam('action');139 $this->moduleName = $request->getParam('module'); 140 $this->actionName = $request->getParam('action'); 141 141 142 142 if(empty($this->moduleName)){ … … 151 151 } 152 152 153 // verification du module153 // module check 154 154 if($gJConfig->checkTrustedModules && !in_array($this->moduleName,$gJConfig->_trustedModules)){ 155 155 throw new jException('jelix~errors.module.untrusted',$this->moduleName); trunk/lib/jelix/core/jSession.class.php
r1009 r1077 4 4 * @subpackage core 5 5 * @author Julien Issler 6 * @contributor 7 * @copyright 2007-2008 Julien Issler 6 * @contributor Laurent Jouanneau 7 * @copyright 2007-2008 Julien Issler, 2008 Laurent Jouanneau 8 8 * @link http://www.jelix.org 9 9 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html … … 27 27 public static function start(){ 28 28 29 $params = & $GLOBALS['gJConfig']->sessions; 30 29 31 // 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']){32 if($GLOBALS['gJCoord']->request instanceof jCmdLineRequest || !$params['start']){ 31 33 return false; 32 34 } 33 34 $params = $GLOBALS['gJConfig']->sessions;35 35 36 36 //make sure that the session cookie is only for the current application … … 38 38 session_set_cookie_params ( 0 , $GLOBALS['gJConfig']->urlengine['basePath']); 39 39 40 if( isset($params['storage'])){40 if($params['storage'] != ''){ 41 41 42 42 /* on debian/ubuntu (maybe others), garbage collector launch probability is set to 0 … … 71 71 } 72 72 73 if(isset($params['name'])){ 73 if($params['name'] !=''){ 74 #ifnot ENABLE_OPTIMIZED_SOURCE 74 75 if(!preg_match('#^[a-zA-Z0-9]+$#',$params['name'])){ 75 76 // regexp check because session name can only be alpha numeric according to the php documentation 76 77 throw new jException('jelix~errors.jsession.name.invalid'); 77 78 } 79 #endif 78 80 session_name($params['name']); 79 81 }
