Changeset 75
- Timestamp:
- 02/05/06 11:28:20 (3 years ago)
- Files:
-
- trunk/lib/jelix-scripts/templates/config.classic.ini.php.tpl (modified) (2 diffs)
- trunk/lib/jelix/core/jConfig.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jDefaultConfig.lib.php (modified) (1 diff)
- trunk/lib/jelix/core/jIncluder.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jLocale.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/url/jUrlEngine.significant.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/url/jUrlEngine.simple.class.php (modified) (2 diffs)
- trunk/myapp/var/config/config.classic.ini.php.dist (modified) (2 diffs)
- trunk/testapp/modules/unittest/classes/utcreateurls.class.php (modified) (5 diffs)
- trunk/testapp/modules/unittest/classes/utparseurls.class.php (modified) (2 diffs)
- trunk/testapp/var/config/config.classic.ini.php.dist (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix-scripts/templates/config.classic.ini.php.tpl
r68 r75 44 44 45 45 [compilation] 46 check _cache_filetime = on46 checkCacheFiletime = on 47 47 force = off 48 48 … … 52 52 53 53 ; active l'analyse d'url (mettre �ff si vous utilisez le mod_rewrite d'apache) 54 enable _parser = on54 enableParser = on 55 55 56 multiview _on= off56 multiview = off 57 57 58 58 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour acc�r �ndex.php etc.) 59 59 ; peut �e �le �/" si vous sp�fiez www comme �nt le documentRoot de votre site au niveau du serveur 60 base path = "/{$appname}/www"60 basePath = "/{$appname}/www" 61 61 62 default _entrypoint= index62 defaultEntrypoint= index 63 63 64 entrypoint _extension= .php64 entrypointExtension= .php 65 65 66 notfound _act = "jelix~notfound"66 notfoundAct = "jelix~notfound" 67 67 68 68 ;indique si vous utilisez IIS comme serveur 69 use _IIS = off69 useIIS = off 70 70 71 71 ;indique le param�e dans $_GET o� indiqu�e path_info 72 IIS _path_key = __JELIX_URL__72 IISPathKey = __JELIX_URL__ 73 73 74 ;indique si il faut stripslash�e path_info r�p� par le biais de url_IIS_path_key75 IIS _stripslashes_path_key = on74 ;indique si il faut stripslash�e path_info r�p� par le biais de IISPathKey 75 IISStripslashes_path_key = on 76 76 77 77 trunk/lib/jelix/core/jConfig.class.php
r61 r75 68 68 if(!file_exists($file)){ 69 69 $compil=true; 70 }else if($config->compilation['check _cache_filetime']){70 }else if($config->compilation['checkCacheFiletime']){ 71 71 $t = filemtime($file); 72 72 if(filemtime(JELIX_APP_CONFIG_PATH.$configFile)>$t){ trunk/lib/jelix/core/jDefaultConfig.lib.php
r71 r75 58 58 'compilation' => 59 59 array ( 60 'check _cache_filetime' => '1',60 'checkCacheFiletime' => '1', 61 61 'force' => '' 62 62 ), 63 63 'urlengine' => 64 64 array ( 65 'use _IIS' => '',66 'IIS _path_key' => '\'__JELIX_URL__\'',67 'IIS _stripslashes_path_key' => '1',68 'default _entrypoint' => 'index',69 'entrypoint _extension' => '.php',65 'useIIS' => '', 66 'IISPathKey' => '\'__JELIX_URL__\'', 67 'IISStripslashesPathKey' => '1', 68 'defaultEntrypoint' => 'index', 69 'entrypointExtension' => '.php', 70 70 'engine' => 'simple', 71 'base path'=>'',72 'enable _parser' => '1',73 'multiview _on' => '',74 'notfound _act' => 'jelix~notfound'71 'basePath'=>'', 72 'enableParser' => '1', 73 'multiview' => '', 74 'notfoundAct' => 'jelix~notfound' 75 75 ), 76 76 'simple_urlengine_entrypoints' => trunk/lib/jelix/core/jIncluder.class.php
r54 r75 70 70 } 71 71 72 if($gJConfig->compilation['check _cache_filetime'] && !$mustCompile){72 if($gJConfig->compilation['checkCacheFiletime'] && !$mustCompile){ 73 73 if( filemtime($sourcefile) > filemtime($cachefile)){ 74 74 $mustCompile = true; … … 110 110 111 111 $mustCompile = $gJConfig->compilation['force'] || !file_exists($cachefile); 112 $checkCompile = $gJConfig->compilation['check _cache_filetime'];112 $checkCompile = $gJConfig->compilation['checkCacheFiletime']; 113 113 114 114 if(!$mustCompile && $checkCompile){ trunk/lib/jelix/core/jLocale.class.php
r24 r75 78 78 $okcompile = false; 79 79 }else{ 80 if ($gJConfig->compilation['check _cache_filetime']){80 if ($gJConfig->compilation['checkCacheFiletime']){ 81 81 if (is_readable ($source) && filemtime($source) > filemtime($cache)){ 82 82 $okcompile = false; trunk/lib/jelix/core/jRequest.class.php
r21 r75 57 57 } 58 58 }else{ 59 if($gJConfig->urlengine['use _IIS'] && isset ($_GET[$gJConfig->urlengine['url_IIS_path_key']])){60 $pathinfo = $_GET[$gJConfig->urlengine[' url_IIS_path_key']];61 $pathinfo = $gJConfig->urlengine['IIS _stripslashes_path_key'] === true ? stripslashes($pathinfo) : $pathinfo;59 if($gJConfig->urlengine['useIIS'] && isset ($_GET[$gJConfig->urlengine['IISPathKey']])){ 60 $pathinfo = $_GET[$gJConfig->urlengine['IISPathKey']]; 61 $pathinfo = $gJConfig->urlengine['IISStripslashesPathKey'] === true ? stripslashes($pathinfo) : $pathinfo; 62 62 }else{ 63 63 //if($_SERVER['PHP_SELF']!= $_SERVER['SCRIPT_NAME']){ trunk/lib/jelix/core/url/jUrlEngine.significant.class.php
r73 r75 60 60 $url = new jUrl($scriptNamePath, $params, $pathinfo); 61 61 62 if ($gJConfig->urlengine['enable _parser']){62 if ($gJConfig->urlengine['enableParser']){ 63 63 $sel = new jSelectorUrlCfgSig('urls.xml'); 64 64 jIncluder::inc($sel); 65 $basepath = $GLOBALS['gJConfig']->urlengine['base path'];65 $basepath = $GLOBALS['gJConfig']->urlengine['basePath']; 66 66 if(strpos($scriptNamePath, $basepath) === 0){ 67 67 $snp = substr($scriptNamePath,strlen($basepath)); … … 69 69 $snp = $scriptNamePath; 70 70 } 71 $pos = strrpos($snp,$gJConfig->urlengine['entrypoint _extension']);71 $pos = strrpos($snp,$gJConfig->urlengine['entrypointExtension']); 72 72 if($pos !== false){ 73 73 $snp = substr($snp,0,$pos); … … 93 93 global $gJConfig; 94 94 /*$script = $url->scriptName; 95 if(strpos($script, $gJConfig->urlengine['entrypoint _extension']) !== false){96 $script=substr($script,0,- (strlen($gJConfig->urlengine['entrypoint _extension'])));95 if(strpos($script, $gJConfig->urlengine['entrypointExtension']) !== false){ 96 $script=substr($script,0,- (strlen($gJConfig->urlengine['entrypointExtension']))); 97 97 }*/ 98 98 if(substr($url->pathInfo,-1) == '/' && $url->pathInfo != '/'){ … … 164 164 if(!$foundurl && !$isDefault){ 165 165 $url->pathInfo=''; 166 $url->params = $url->getAction($gJConfig->urlengine['notfound _act']);166 $url->params = $url->getAction($gJConfig->urlengine['notfoundAct']); 167 167 $foundurl = true; 168 168 } … … 227 227 228 228 $url->scriptName = $urlinfo[1]; 229 if(!$GLOBALS['gJConfig']->urlengine['multiview _on']){230 $url->scriptName.=$GLOBALS['gJConfig']->urlengine['entrypoint _extension'];229 if(!$GLOBALS['gJConfig']->urlengine['multiview']){ 230 $url->scriptName.=$GLOBALS['gJConfig']->urlengine['entrypointExtension']; 231 231 } 232 232 // pour certains types de requete, les param�es ne sont pas dans l'url trunk/lib/jelix/core/url/jUrlEngine.simple.class.php
r71 r75 37 37 global $gJConfig; 38 38 39 $script = $gJConfig->urlengine['default _entrypoint'];39 $script = $gJConfig->urlengine['defaultEntrypoint']; 40 40 41 41 if(count($gJConfig->simple_urlengine_entrypoints)){ … … 63 63 } 64 64 } 65 if(!$gJConfig->urlengine['multiview _on']){66 $script.=$gJConfig->urlengine['entrypoint _extension'];65 if(!$gJConfig->urlengine['multiview']){ 66 $script.=$gJConfig->urlengine['entrypointExtension']; 67 67 } 68 68 return $script; trunk/myapp/var/config/config.classic.ini.php.dist
r69 r75 44 44 45 45 [compilation] 46 check _cache_filetime = on46 checkCacheFiletime = on 47 47 force = off 48 48 … … 52 52 53 53 ; active l'analyse d'url (mettre �ff si vous utilisez le mod_rewrite d'apache) 54 enable _parser = on54 enableParser = on 55 55 56 multiview _on= off56 multiview = off 57 57 58 58 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour acc�r �ndex.php etc.) 59 59 ; peut �e �le �/" si vous sp�fiez www comme �nt le documentRoot de votre site au niveau du serveur 60 base path = "/myapp/www/"60 basePath = "/myapp/www/" 61 61 62 default _entrypoint= index62 defaultEntrypoint= index 63 63 64 entrypoint _extension= .php64 entrypointExtension= .php 65 65 66 notfound _act = "jelix~notfound"66 notfoundAct = "jelix~notfound" 67 67 68 68 ;indique si vous utilisez IIS comme serveur 69 use _IIS = off69 useIIS = off 70 70 71 71 ;indique le param�e dans $_GET o� indiqu�e path_info 72 IIS _path_key = __JELIX_URL__72 IISPathKey = __JELIX_URL__ 73 73 74 ;indique si il faut stripslash�e path_info r�p� par le biais de url_IIS_path_key75 IIS _stripslashes_path_key = on74 ;indique si il faut stripslash�e path_info r�p� par le biais de IISPathKey 75 IISStripslashesPathKey = on 76 76 77 77 trunk/testapp/modules/unittest/classes/utcreateurls.class.php
r71 r75 48 48 $gJConfig->urlengine = array( 49 49 'engine'=>'simple', 50 'enable _parser'=>true,51 'multiview _on'=>false,52 'base path'=>'/',53 'default _entrypoint'=>'index',54 'entrypoint _extension'=>'.php',55 'notfound _act'=>'jelix~notfound'50 'enableParser'=>true, 51 'multiview'=>false, 52 'basePath'=>'/', 53 'defaultEntrypoint'=>'index', 54 'entrypointExtension'=>'.php', 55 'notfoundAct'=>'jelix~notfound' 56 56 ); 57 57 /* $gJConfig->simple_urlengine_entrypoints = array( … … 90 90 91 91 $this->sendMessage("simple, multiview = true"); 92 $gJConfig->urlengine['multiview _on']=true;92 $gJConfig->urlengine['multiview']=true; 93 93 $trueResult=array( 94 94 "index?mois=10&annee=2005&id=35&module=unittest&action=url1", … … 118 118 $gJConfig->urlengine = array( 119 119 'engine'=>'significant', 120 'enable _parser'=>true,121 'multiview _on'=>false,122 'base path'=>'/',123 'default _entrypoint'=>'index',124 'entrypoint _extension'=>'.php',125 'notfound _act'=>'jelix~notfound'120 'enableParser'=>true, 121 'multiview'=>false, 122 'basePath'=>'/', 123 'defaultEntrypoint'=>'index', 124 'entrypointExtension'=>'.php', 125 'notfoundAct'=>'jelix~notfound' 126 126 ); 127 127 … … 157 157 158 158 $this->sendMessage("significant, multiview = true"); 159 $gJConfig->urlengine['multiview _on']=true;159 $gJConfig->urlengine['multiview']=true; 160 160 $trueResult=array( 161 161 "index/test/news/2005/10/35", … … 174 174 } 175 175 } 176 /* // significant177 // parse178 $GLOBALS['gJConfig']->urlengine['enable_parser']179 jSelectorUrlCfgSig180 $GLOBALS['gJConfig']->urlengine['basepath']181 $this->dataCreateUrl = & $GLOBALS['SIGNIFICANT_CREATEURL'];182 $this->dataParseUrl = & $GLOBALS['SIGNIFICANT_PARSEURL'];183 $gJConfig->urlengine['notfound_act']184 //create185 jContext::get()186 $this->dataCreateUrl = & $GLOBALS['SIGNIFICANT_CREATEURL'];187 $this->dataParseUrl = & $GLOBALS['SIGNIFICANT_PARSEURL'];188 $gJConfig->urlengine['multiview_on']189 $gJConfig->urlengine['entrypoint_extension'];190 */191 176 ?> trunk/testapp/modules/unittest/classes/utparseurls.class.php
r73 r75 47 47 $gJConfig->urlengine = array( 48 48 'engine'=>'significant', 49 'enable _parser'=>true,50 'multiview _on'=>false,51 'base path'=>'/',52 'default _entrypoint'=>'index',53 'entrypoint _extension'=>'.php',54 'notfound _act'=>'jelix~notfound'49 'enableParser'=>true, 50 'multiview'=>false, 51 'basePath'=>'/', 52 'defaultEntrypoint'=>'index', 53 'entrypointExtension'=>'.php', 54 'notfoundAct'=>'jelix~notfound' 55 55 ); 56 56 … … 90 90 91 91 $this->sendMessage("significant, multiview = true"); 92 $gJConfig->urlengine['multiview _on']=true;92 $gJConfig->urlengine['multiview']=true; 93 93 $request=array( 94 94 array("index","/test/news/2005/10/35",array()), trunk/testapp/var/config/config.classic.ini.php.dist
r71 r75 45 45 46 46 [compilation] 47 check _cache_filetime = on47 checkCacheFiletime = on 48 48 force = off 49 49 … … 53 53 54 54 ; active l'analyse d'url (mettre �ff si vous utilisez le mod_rewrite d'apache) 55 enable _parser = on55 enableParser = on 56 56 57 multiview _on= off57 multiview = off 58 58 59 59 ; chemin url jusqu'au repertoire www (celui que vous tapez dans le navigateur pour acc�r �ndex.php etc.) 60 60 ; peut �e �le �/" si vous sp�fiez www comme �nt le documentRoot de votre site au niveau du serveur 61 base path = "/testapp/www/"61 basePath = "/testapp/www/" 62 62 63 default _entrypoint= index63 defaultEntrypoint= index 64 64 65 entrypoint _extension= .php65 entrypointExtension= .php 66 66 67 notfound _act = "jelix~notfound"67 notfoundAct = "jelix~notfound" 68 68 69 69 ;indique si vous utilisez IIS comme serveur 70 use _IIS = off70 useIIS = off 71 71 72 72 ;indique le param�e dans $_GET o� indiqu�e path_info 73 IIS _path_key = __JELIX_URL__73 IISPathKey = __JELIX_URL__ 74 74 75 ;indique si il faut stripslash�e path_info r�p� par le biais de url_IIS_path_key76 IIS _stripslashes_path_key = on75 ;indique si il faut stripslash�e path_info r�p� par le biais de IISPathKey 76 IISStripslashesPathKey = on 77 77 78 78
