Changeset 1150
- Timestamp:
- 11/06/08 21:11:06 (2 months ago)
- Files:
-
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jSession.class.php (modified) (3 diffs)
- trunk/lib/jelix/core/selector/jSelectorActFast.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/core/jConfigCompiler.class.php
r1119 r1150 167 167 $config->timeZone = "Europe/Paris"; 168 168 #endif 169 } 170 171 if($config->sessions['storage'] == 'files'){ 172 $config->sessions['files_path'] = str_replace(array('lib:','app:'), array(LIB_PATH, JELIX_APP_PATH), $config->sessions['files_path']); 169 173 } 170 174 trunk/lib/jelix/core/jCoordinator.class.php
r1077 r1150 28 28 * @var array 29 29 */ 30 public $plugins =array();30 public $plugins = array(); 31 31 32 32 /** … … 225 225 226 226 $ctrlpath = $selector->getPath(); 227 227 #ifnot ENABLE_OPTIMIZED_SOURCE 228 228 if(!file_exists($ctrlpath)){ 229 229 throw new jException('jelix~errors.ad.controller.file.unknow',array($this->actionName,$ctrlpath)); 230 230 } 231 #endif 231 232 require_once($ctrlpath); 232 233 $class = $selector->getClass(); 234 #ifnot ENABLE_OPTIMIZED_SOURCE 233 235 if(!class_exists($class,false)){ 234 236 throw new jException('jelix~errors.ad.controller.class.unknow',array($this->actionName,$class, $ctrlpath)); 235 237 } 236 238 #endif 237 239 $ctrl = new $class($this->request); 238 240 if($ctrl instanceof jIRestController){ 239 241 $method = $selector->method = strtolower($_SERVER['REQUEST_METHOD']); 240 }elseif(!method_exists($ctrl, $selector->method)){241 throw new jException('jelix~errors.ad.controller.method.unknow',array($this->actionName, $selector->method, $class, $ctrlpath));242 }elseif(!method_exists($ctrl, $selector->method)){ 243 throw new jException('jelix~errors.ad.controller.method.unknow',array($this->actionName, $selector->method, $class, $ctrlpath)); 242 244 } 243 245 return $ctrl; trunk/lib/jelix/core/jRequest.class.php
r1096 r1150 111 111 } 112 112 113 if ($gJConfig->isWindows && $pathinfo && strpos ($pathinfo, $this->urlScript) !== false){113 if ($gJConfig->isWindows && $pathinfo && strpos($pathinfo, $this->urlScript) !== false){ 114 114 //under IIS, we may get /subdir/index.php/mypath/myaction as PATH_INFO, so we fix it 115 115 $pathinfo = substr ($pathinfo, strlen ($this->urlScript)); trunk/lib/jelix/core/jSession.class.php
r1077 r1150 30 30 31 31 // do not start the session if the request is made from the command line or if sessions are disabled in configuration 32 if ($GLOBALS['gJCoord']->request instanceof jCmdLineRequest || !$params['start']){32 if ($GLOBALS['gJCoord']->request instanceof jCmdLineRequest || !$params['start']) { 33 33 return false; 34 34 } 35 35 36 36 //make sure that the session cookie is only for the current application 37 if (!$params['shared_session'])37 if (!$params['shared_session']) 38 38 session_set_cookie_params ( 0 , $GLOBALS['gJConfig']->urlengine['basePath']); 39 39 40 if ($params['storage'] != ''){40 if ($params['storage'] != '') { 41 41 42 42 /* on debian/ubuntu (maybe others), garbage collector launch probability is set to 0 … … 47 47 48 48 switch($params['storage']){ 49 50 49 case 'dao': 51 50 session_set_save_handler( … … 61 60 62 61 case 'files': 63 $path = str_replace(array('lib:','app:'), array(LIB_PATH, JELIX_APP_PATH), $params['files_path']); 64 session_save_path($path); 65 break; 66 67 default: 62 session_save_path($params['files_path']); 68 63 break; 69 64 } 70 71 65 } 72 66 trunk/lib/jelix/core/selector/jSelectorActFast.class.php
r1074 r1150 72 72 73 73 public function getClass(){ 74 #if ENABLE_OLD_CLASS_NAMING 74 75 $className = $this->controller.'Ctrl'; 75 #if ENABLE_OLD_CLASS_NAMING76 76 if(!class_exists($className,false)){ 77 77 if(class_exists('CT'.$this->controller,false)) 78 78 $className = 'CT'.$this->controller; 79 79 } 80 return $className; 81 #else 82 return $this->controller.'Ctrl'; 80 83 #endif 81 return $className;82 84 } 83 85
