Changeset 1075
- Timestamp:
- 09/06/08 01:14:49 (4 months ago)
- Files:
-
- trunk/build/buildjelix.php (modified) (2 diffs)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (2 diffs)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (8 diffs)
- trunk/lib/jelix/core/jInstallChecker.class.php (modified) (3 diffs)
- trunk/lib/jelix/core/jRequest.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jCssRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jJsonRpcRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jRdfRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jSoapRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jXmlRpcRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/init.php (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/core.jrequest.html_cli.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/buildjelix.php
r1027 r1075 41 41 ), 42 42 'WITH_BYTECODE_CACHE'=> array( 43 "says which bytecode cache engine will be recognized by jelix. Possible values : 'auto' (automatic detection), 'apc', 'eaccelerator' or '' for none",43 "says which bytecode cache engine will be recognized by jelix. Possible values : 'auto' (automatic detection), 'apc', 'eaccelerator', 'xcache' or '' for none", 44 44 'auto', 45 '/^(auto|apc|eaccelerator )?$/',45 '/^(auto|apc|eaccelerator|xcache)?$/', 46 46 ), 47 47 'ENABLE_DEVELOPER'=>array( … … 167 167 if($ENABLE_PHP_FILTER) $BUILD_FLAGS |=8; 168 168 switch($WITH_BYTECODE_CACHE){ 169 case 'auto': $BUILD_FLAGS |= 48; break;169 case 'auto': $BUILD_FLAGS |=112; break; 170 170 case 'apc': $BUILD_FLAGS |=16; break; 171 171 case 'eaccelerator': $BUILD_FLAGS |=32; break; 172 case 'xcache': $BUILD_FLAGS |=64; break; 172 173 } 173 174 if($ENABLE_OLD_CLASS_NAMING) $BUILD_FLAGS |=256; trunk/lib/jelix/core/defaultconfig.ini.php
r1064 r1075 25 25 26 26 enableOldActionSelector = 27 28 ; reserved variable 29 requestScript= 27 30 28 31 [coordplugins] … … 160 163 significantFile = "urls.xml" 161 164 165 ; filled automatically by jelix 166 urlScript= 167 urlScriptPath= 168 urlScriptName= 169 162 170 [simple_urlengine_entrypoints] 163 171 ; parameters for the simple url engine. This is the list of entry points trunk/lib/jelix/core/jConfigCompiler.class.php
r1062 r1075 45 45 @jelix_read_ini(JELIX_APP_CONFIG_PATH.'defaultconfig.ini.php', $config); 46 46 47 if($configFile != 'defaultconfig.ini.php'){47 if($configFile != 'defaultconfig.ini.php'){ 48 48 if(!file_exists(JELIX_APP_CONFIG_PATH.$configFile)) 49 49 die("Jelix config file $configFile is missing !"); … … 51 51 die("Syntax error in the Jelix config file $configFile !"); 52 52 } 53 53 #else 54 $config = jIniFile::read(JELIX_LIB_CORE_PATH.'defaultconfig.ini.php'); 55 56 if( $commonConfig = parse_ini_file(JELIX_APP_CONFIG_PATH.'defaultconfig.ini.php',true)){ 57 self::_mergeConfig($config, $commonConfig); 58 } 59 60 if($configFile !='defaultconfig.ini.php'){ 61 if(!file_exists(JELIX_APP_CONFIG_PATH.$configFile)) 62 die("Jelix config file $configFile is missing !"); 63 if( false === ($userConfig = parse_ini_file(JELIX_APP_CONFIG_PATH.$configFile,true))) 64 die("Syntax error in the Jelix config file $configFile !"); 65 self::_mergeConfig($config, $userConfig); 66 } 67 $config = (object) $config; 68 #endif 69 70 self::prepareConfig($config); 71 72 #if WITH_BYTECODE_CACHE == 'auto' 73 if(BYTECODE_CACHE_EXISTS){ 74 $filename=JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.conf.php'; 75 if ($f = @fopen($filename, 'wb')) { 76 fwrite($f, '<?php $config = '.var_export(get_object_vars($config),true).";\n?>"); 77 fclose($f); 78 } else { 79 throw new Exception('(24)Error while writing config cache file '.$filename); 80 } 81 }else{ 82 jIniFile::write(get_object_vars($config), JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.resultini.php', ";<?php die('');?>\n"); 83 } 84 #elseif WITH_BYTECODE_CACHE 85 $filename=JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.conf.php'; 86 if ($f = @fopen($filename, 'wb')) { 87 fwrite($f, '<?php $config = '.var_export(get_object_vars($config),true).";\n?>"); 88 fclose($f); 89 } else { 90 throw new Exception('(24)Error while writing config cache file '.$filename); 91 } 92 #else 93 jIniFile::write(get_object_vars($config), JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.resultini.php', ";<?php die('');?>\n"); 94 #endif 95 return $config; 96 } 97 98 /** 99 * fill some config properties with calculated values 100 */ 101 static protected function prepareConfig($config){ 102 54 103 $config->isWindows = (DIRECTORY_SEPARATOR === '\\'); 55 104 if(trim( $config->startAction) == '') { … … 74 123 $config->urlengine['scriptNameServerVariable'] = self::_findServerName($config->urlengine['entrypointExtension']); 75 124 } 76 77 $path=$config->urlengine['basePath']; 78 if($path!='/' && $path!=''){ 125 $config->urlengine['urlScript'] = $_SERVER[$config->urlengine['scriptNameServerVariable']]; 126 $lastslash = strrpos ($config->urlengine['urlScript'], '/'); 127 $config->urlengine['urlScriptPath'] = substr ($config->urlengine['urlScript'], 0, $lastslash ).'/'; 128 $config->urlengine['urlScriptName'] = substr ($config->urlengine['urlScript'], $lastslash+1); 129 130 $path = $config->urlengine['basePath']; 131 if ($path != '/' && $path != '') { 79 132 if($path{0} != '/') $path='/'.$path; 80 133 if(substr($path,-1) != '/') $path.='/'; 81 $config->urlengine['basePath'] = $path; 82 } 83 84 if($path!='' && $config->urlengine['jelixWWWPath']{0} != '/') 134 135 if(strpos($config->urlengine['urlScriptPath'], $path) !== 0){ 136 throw new Exception('Jelix Error: basePath ('.$path.') in config file doesn\'t correspond to current base path. You should setup it to '.$config->urlengine['urlScriptPath']); 137 } 138 139 } else if ($path == '') { 140 // for beginners or simple site, we "guess" the base path 141 $path = $config->urlengine['urlScriptPath']; 142 } 143 $config->urlengine['basePath'] = $path; 144 145 if($config->urlengine['jelixWWWPath']{0} != '/') 85 146 $config->urlengine['jelixWWWPath'] = $path.$config->urlengine['jelixWWWPath']; 86 147 … … 110 171 die("Syntax error in the locale parameter in Jelix config file $configFile !"); 111 172 }*/ 112 #else113 $config = jIniFile::read(JELIX_LIB_CORE_PATH.'defaultconfig.ini.php');114 115 if( $commonConfig = parse_ini_file(JELIX_APP_CONFIG_PATH.'defaultconfig.ini.php',true)){116 self::_mergeConfig($config, $commonConfig);117 }118 119 if($configFile !='defaultconfig.ini.php'){120 if(!file_exists(JELIX_APP_CONFIG_PATH.$configFile))121 die("Jelix config file $configFile is missing !");122 if( false === ($userConfig = parse_ini_file(JELIX_APP_CONFIG_PATH.$configFile,true)))123 die("Syntax error in the Jelix config file $configFile !");124 self::_mergeConfig($config, $userConfig);125 }126 $config['isWindows'] = (DIRECTORY_SEPARATOR == '\\');127 if(trim( $config['startAction']) == '') {128 $config['startAction'] = ':';129 }130 131 $config['_allBasePath'] = array();132 $config['_modulesPathList'] = self::_loadPathList($config['modulesPath'], $config['_allBasePath']);133 134 self::_loadPluginsPathList($config);135 136 if($config['checkTrustedModules']){137 $config['_trustedModules'] = explode(',',$config['trustedModules']);138 if(!in_array('jelix',$config['_trustedModules']))139 $config['_trustedModules'][]='jelix';140 }else{141 $config['_trustedModules'] = array_keys($config['_modulesPathList']);142 }143 144 if($config['urlengine']['scriptNameServerVariable'] == '') {145 $config['urlengine']['scriptNameServerVariable'] = self::_findServerName($config['urlengine']['entrypointExtension']);146 }147 148 $path=$config['urlengine']['basePath'];149 if($path!='/' && $path!=''){150 if($path{0} != '/') $path='/'.$path;151 if(substr($path,-1) != '/') $path.='/';152 $config['urlengine']['basePath'] = $path;153 }154 155 if($path!='' && $config['urlengine']['jelixWWWPath']{0} != '/')156 $config['urlengine']['jelixWWWPath'] = $path.$config['urlengine']['jelixWWWPath'];157 158 self::_initResponsesPath($config['responses']);159 self::_initResponsesPath($config['_coreResponses']);160 if (trim($config['timeZone']) === '') {161 #if PHP50162 $config['timeZone'] = "Europe/Paris";163 #else164 $tz = ini_get('date.timezone');165 if ($tz != '')166 $config['timeZone'] = $tz;167 else168 $config['timeZone'] = "Europe/Paris";169 #endif170 }171 172 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config['locale'],$m)){173 if(!isset($m[2])){174 $m[2] = $m[1];175 }176 $config['defaultLang'] = strtolower($m[1]);177 $config['defaultCountry'] = strtoupper($m[2]);178 $config['locale'] = $config['defaultLang'].'_'.$config['defaultCountry'];179 }else{180 die("Syntax error in the locale parameter in Jelix config file $configFile !");181 }*/182 #endif183 184 #if WITH_BYTECODE_CACHE == 'auto'185 if(BYTECODE_CACHE_EXISTS){186 $filename=JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.conf.php';187 if ($f = @fopen($filename, 'wb')) {188 #if ENABLE_PHP_JELIX189 fwrite($f, '<?php $config = '.var_export(get_object_vars($config),true).";\n?>");190 #else191 fwrite($f, '<?php $config = '.var_export($config,true).";\n?>");192 #endif193 fclose($f);194 } else {195 throw new Exception('(24)Error while writing config cache file '.$filename);196 }197 }else{198 #if ENABLE_PHP_JELIX199 jIniFile::write(get_object_vars($config), JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.resultini.php', ";<?php die('');?>\n");200 #else201 jIniFile::write($config, JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.resultini.php', ";<?php die('');?>\n");202 #endif203 }204 #elseif WITH_BYTECODE_CACHE205 $filename=JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.conf.php';206 if ($f = @fopen($filename, 'wb')) {207 #if ENABLE_PHP_JELIX208 fwrite($f, '<?php $config = '.var_export(get_object_vars($config),true).";\n?>");209 #else210 fwrite($f, '<?php $config = '.var_export($config,true).";\n?>");211 #endif212 fclose($f);213 } else {214 throw new Exception('(24)Error while writing config cache file '.$filename);215 }216 #else217 #if ENABLE_PHP_JELIX218 jIniFile::write(get_object_vars($config), JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.resultini.php', ";<?php die('');?>\n");219 #else220 jIniFile::write($config, JELIX_APP_TEMP_PATH.str_replace('/','~',$configFile).'.resultini.php', ";<?php die('');?>\n");221 #endif222 #endif223 #ifnot ENABLE_PHP_JELIX224 $config = (object) $config;225 #endif226 return $config;227 173 } 228 174 … … 232 178 * @return array list of full path 233 179 */ 234 static pr ivatefunction _loadPathList($list, &$allBasePath){180 static protected function _loadPathList($list, &$allBasePath){ 235 181 $list = split(' *, *',$list); 236 182 array_unshift($list, JELIX_LIB_PATH.'core-modules/'); … … 259 205 } 260 206 261 262 207 /** 263 208 * Analyse plugin paths 264 209 * @param array|object $config the config container 265 210 */ 266 static private function _loadPluginsPathList(&$config){ 267 #if ENABLE_PHP_JELIX 211 static protected function _loadPluginsPathList(&$config){ 268 212 $list = split(' *, *',$config->pluginsPath); 269 #else270 $list = split(' *, *',$config['pluginsPath']);271 #endif272 213 array_unshift($list, JELIX_LIB_PATH.'plugins/'); 273 214 foreach($list as $k=>$path){ … … 286 227 if($subdir = opendir($p.$f)){ 287 228 if($k!=0) 288 #if ENABLE_PHP_JELIX289 229 $config->_allBasePath[]=$p.$f.'/'; 290 #else291 $config['_allBasePath'][]=$p.$f.'/';292 #endif293 230 while (false !== ($subf = readdir($subdir))) { 294 231 if ($subf{0} != '.' && is_dir($p.$f.'/'.$subf)) { 295 232 if($f == 'tpl'){ 296 #if ENABLE_PHP_JELIX297 233 $prop = '_tplpluginsPathList_'.$subf; 298 234 $config->{$prop}[] = $p.$f.'/'.$subf.'/'; … … 300 236 $prop = '_pluginsPathList_'.$f; 301 237 $config->{$prop}[$subf] = $p.$f.'/'.$subf.'/'; 302 #else303 $config['_tplpluginsPathList_'.$subf][] = $p.$f.'/'.$subf.'/';304 }else{305 $config['_pluginsPathList_'.$f][$subf] =$p.$f.'/'.$subf.'/';306 #endif307 238 } 308 239 } trunk/lib/jelix/core/jInstallChecker.class.php
r1001 r1075 67 67 'extension.xmlrpc'=>'Cette édition de Jelix a besoin de l\'extension xmlrpc', 68 68 'extension.jelix'=>'Cette édition de Jelix a besoin de l\'extension jelix', 69 'extension.apc'=>'Cette édition de Jelix a besoin de l\'extension apc', 70 'extension.eaccelerator'=>'Cette édition de Jelix a besoin de l\'extension eaccelerator', 69 'extension.opcode.cache'=>'Cette édition de Jelix a besoin d\'une extension de cache d\'opcode (apc, eaccelerator...)', 71 70 'path.core'=>'Le fichier init.php de jelix ou le fichier application.ini.php de votre application n\'est pas chargé', 72 71 'path.temp'=>'Le repertoire temporaire n\'est pas accessible en écriture ou alors JELIX_APP_TEMP_PATH n\'est pas configurée comme il faut', … … 122 121 'extension.xmlrpc'=>'This Jelix edition require the xmlrpc extension', 123 122 'extension.jelix'=>'This Jelix edition require the jelix extension', 124 'extension.apc'=>'This Jelix edition require the apc extension', 125 'extension.eaccelerator'=>'This Jelix edition require the eaccelerator extension', 123 'extension.opcode.cache'=>'This Jelix edition require an extension for opcode cache (apc, eaccelerator...)', 126 124 'path.core'=>'jelix init.php file or application.ini.php file is not loaded', 127 125 'path.temp'=>'temp/yourApp directory is not writable or JELIX_APP_TEMP_PATH is not correctly set !', … … 306 304 $ok=false; 307 305 } 308 if($this->buildProperties['WITH_BYTECODE_CACHE'] == 'apc' && !extension_loaded ('apc')) { 309 $this->error('extension.apc'); 310 $ok=false; 311 } 312 if($this->buildProperties['WITH_BYTECODE_CACHE'] == 'eaccelerator' && !extension_loaded ('eaccelerator')) { 313 $this->error('extension.eaccelerator'); 314 $ok=false; 315 } 316 306 if($this->buildProperties['WITH_BYTECODE_CACHE'] != 'auto' && $this->buildProperties['WITH_BYTECODE_CACHE'] != '') { 307 if(!extension_loaded ('apc') && !extension_loaded ('eaccelerator') && !extension_loaded ('xcache')) { 308 $this->error('extension.opcode.cache'); 309 $ok=false; 310 } 311 } 317 312 if($ok) 318 313 $this->ok('extensions.required.ok'); trunk/lib/jelix/core/jRequest.class.php
r933 r1075 67 67 public $urlPathInfo; 68 68 69 70 /**71 * @var string72 * @deprecated see $urlScriptPath73 */74 public $url_script_path;75 76 /**77 * @var string78 * @deprecated see $urlScriptName79 */80 public $url_script_name;81 82 /**83 * @var string84 * @deprecated see $urlPathInfo85 */86 public $url_path_info;87 88 89 90 69 function __construct(){ } 91 70 … … 109 88 global $gJConfig; 110 89 111 if (isset($_SERVER[$gJConfig->urlengine['scriptNameServerVariable']])) 112 $this->urlScript = $_SERVER[$gJConfig->urlengine['scriptNameServerVariable']]; 113 else 114 $this->urlScript = $_SERVER['SCRIPT_NAME']; 115 116 $lastslash = strrpos ($this->urlScript, '/'); 117 $this->url_script_path = $this->urlScriptPath = substr ($this->urlScript, 0, $lastslash ).'/'; 118 119 if($gJConfig->urlengine['basePath'] == ''){ // for beginners or simple site, we "guess" the base path 120 $gJConfig->urlengine['basePath'] = $this->urlScriptPath; 121 if($gJConfig->urlengine['jelixWWWPath']{0} != '/') 122 $gJConfig->urlengine['jelixWWWPath'] = $this->urlScriptPath.$gJConfig->urlengine['jelixWWWPath']; 123 }else if(strpos($this->urlScriptPath,$gJConfig->urlengine['basePath']) !== 0){ 124 throw new Exception('Jelix Error: basePath ('.$gJConfig->urlengine['basePath'].') in config file doesn\'t correspond to current base path. You should setup it to '.$this->urlScriptPath); 125 } 126 127 $this->url_script_name = $this->urlScriptName = substr ($this->urlScript, $lastslash+1); 90 $this->urlScript = $gJConfig->urlengine['urlScript']; 91 $this->urlScriptPath = $gJConfig->urlengine['urlScriptPath']; 92 $this->urlScriptName = $gJConfig->urlengine['urlScriptName']; 128 93 129 94 $piiqp = $gJConfig->urlengine['pathInfoInQueryParameter']; … … 151 116 } 152 117 153 $this->url _path_info = $this->urlPathInfo = $pathinfo;118 $this->urlPathInfo = $pathinfo; 154 119 } 155 120 … … 175 140 176 141 /** 177 * return a list of class name of allowed response corresponding to the request178 * @return array the list, or false which means everything179 * @see jRequest::getResponse()180 */181 public function allowedResponses(){ return false;}182 183 /**184 142 * @param string $respclass the name of a response class 185 143 */ 186 144 public function isAllowedResponse($respclass){ 187 if($ar=$this->allowedResponses()){ 188 return in_array($respclass, $ar); 189 }else 190 return true; 145 return true; 191 146 } 192 147 trunk/lib/jelix/core/request/jCmdLineRequest.class.php
r1001 r1075 25 25 public $defaultResponseType = 'cmdline'; 26 26 27 public function allowedResponses(){28 return array('jResponseCmdline');27 public function isAllowedResponse($respclass){ 28 return ('jResponseCmdline' == $respclass); 29 29 } 30 30 31 31 protected function _initUrlData(){ 32 32 global $gJConfig; 33 $this->url _script_path = $this->urlScriptPath = '/';34 $this->url _script_name = $this->urlScriptName = $this->urlScript = $_SERVER['SCRIPT_NAME'];35 $this->url _path_info = $this->urlPathInfo = '';33 $this->urlScriptPath = '/'; 34 $this->urlScriptName = $this->urlScript = $_SERVER['SCRIPT_NAME']; 35 $this->urlPathInfo = ''; 36 36 } 37 37 trunk/lib/jelix/core/request/jCssRequest.class.php
r1001 r1075 27 27 } 28 28 29 public function allowedResponses(){ return array('jResponseCss');} 29 public function isAllowedResponse($respclass){ 30 return ('jResponseCss' == $respclass); 31 } 30 32 } trunk/lib/jelix/core/request/jJsonRpcRequest.class.php
r1026 r1075 61 61 } 62 62 63 public function allowedResponses(){ return array('jResponseJsonrpc');} 63 public function isAllowedResponse($respclass){ 64 return ('jResponseJsonrpc' == $respclass); 65 } 64 66 65 67 } trunk/lib/jelix/core/request/jRdfRequest.class.php
r1001 r1075 26 26 $this->params = array_merge($url->params, $_POST); 27 27 } 28 public function allowedResponses(){ return array('jResponseRdf');}29 28 29 public function isAllowedResponse($respclass){ 30 return ('jResponseRdf' == $respclass); 31 } 30 32 } 31 33 trunk/lib/jelix/core/request/jSoapRequest.class.php
r879 r1075 58 58 protected function _initParams(){} 59 59 60 public function allowedResponses(){61 return array('jResponseSoap');60 public function isAllowedResponse($respclass){ 61 return ('jResponseSoap' == $respclass); 62 62 } 63 63 trunk/lib/jelix/core/request/jXmlRpcRequest.class.php
r1001 r1075 57 57 } 58 58 59 public function allowedResponses(){ return array('jResponseXmlrpc');} 59 public function isAllowedResponse($respclass){ 60 return ('jResponseXmlrpc' == $respclass); 61 } 60 62 61 63 } trunk/lib/jelix/init.php
r1074 r1075 53 53 54 54 #if WITH_BYTECODE_CACHE == 'auto' 55 define ('BYTECODE_CACHE_EXISTS', function_exists('apc_cache_info')|| function_exists('eaccelerator_info')); 55 define ('BYTECODE_CACHE_EXISTS', function_exists('apc_cache_info') || function_exists('eaccelerator_info') || function_exists('xcache_info')); 56 #elseif WITH_BYTECODE_CACHE 57 define ('BYTECODE_CACHE_EXISTS', true); 58 #else 59 define ('BYTECODE_CACHE_EXISTS', false); 56 60 #endif 57 61 trunk/testapp/modules/jelix_tests/tests/core.jrequest.html_cli.php
r722 r1075 10 10 */ 11 11 12 12 require_once(JELIX_LIB_CORE_PATH.'jConfigCompiler.class.php'); 13 14 15 class configCompileTest extends jConfigCompiler { 16 17 static public function prepareConfig2($config){ 18 self::prepareConfig($config); 19 } 20 } 13 21 14 22 class requestTest extends jRequest { … … 21 29 class UTjrequest extends jUnitTestCase { 22 30 protected $currentServer; 23 protected $currentBasePath; 24 protected $currentConfigScriptName; 25 31 protected $currentConfig; 32 26 33 function setUp() { 27 34 $this->currentServer = $_SERVER; 28 $this->currentConfigScriptName = $GLOBALS['gJConfig']->urlengine['scriptNameServerVariable']; 29 $this->currentBasePath = $GLOBALS['gJConfig']->urlengine['basePath']; 35 $this->currentConfig = clone $GLOBALS['gJConfig']; 30 36 $GLOBALS['gJConfig']->urlengine['basePath'] = '/'; 37 $GLOBALS['gJConfig']->responses=array(); 38 $GLOBALS['gJConfig']->_coreResponses=array(); 31 39 } 32 40 33 41 function tearDown() { 34 42 $_SERVER = $this->currentServer; 35 $GLOBALS['gJConfig']->urlengine['scriptNameServerVariable'] = $this->currentConfigScriptName; 36 $GLOBALS['gJConfig']->urlengine['basePath'] = $this->currentBasePath; 43 $GLOBALS['gJConfig'] = clone $this->currentConfig; 37 44 } 38 45 … … 53 60 ); 54 61 $req = new requestTest(); 62 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 55 63 $req->init(); 56 64 … … 78 86 ); 79 87 $req = new requestTest(); 88 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 80 89 $req->init(); 81 90 … … 99 108 ); 100 109 $req = new requestTest(); 110 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 101 111 $req->init(); 102 112 … … 121 131 ); 122 132 $req = new requestTest(); 133 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 123 134 $req->init(); 124 135 … … 141 152 ); 142 153 $req = new requestTest(); 154 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 143 155 $req->init(); 144 156 … … 168 180 ); 169 181 $req = new requestTest(); 182 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 170 183 $req->init(); 171 184 $this->assertEqual('/foo/', $req->urlScriptPath); … … 189 202 ); 190 203 $req = new requestTest(); 204 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 191 205 $req->init(); 192 206 $this->assertEqual('/foo/', $req->urlScriptPath); … … 210 224 ); 211 225 $req = new requestTest(); 226 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 212 227 $req->init(); 213 228 $this->assertEqual('/foo/', $req->urlScriptPath); … … 230 245 ); 231 246 $req = new requestTest(); 247 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 232 248 $req->init(); 233 249 $this->assertEqual('/foo/', $req->urlScriptPath); … … 256 272 ); 257 273 $req = new requestTest(); 274 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 258 275 $req->init(); 259 276 $this->assertEqual('/foo/', $req->urlScriptPath); … … 279 296 ); 280 297 $req = new requestTest(); 298 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 281 299 $req->init(); 282 300 $this->assertEqual('/foo/', $req->urlScriptPath); … … 304 322 ); 305 323 $req = new requestTest(); 324 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 306 325 $req->init(); 307 326 $this->assertEqual('/foo/', $req->urlScriptPath); … … 326 345 ); 327 346 $req = new requestTest(); 347 configCompileTest::prepareConfig2($GLOBALS['gJConfig']); 328 348 $req->init(); 329 349 $this->assertEqual('/foo/', $req->urlScriptPath); … … 334 354 } 335 355 336 ?>
