Changeset 693
- Timestamp:
- 12/13/07 22:25:14 (1 year ago)
- Files:
-
- trunk/lib/jelix/controllers/jControllerDaoCrud.class.php (modified) (1 diff)
- trunk/lib/jelix/controllers/jControllerDaoCrud.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jSelector.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/jSelector.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/plugins/urls/significant/jSignificantUrlsCompiler.class.php (modified) (2 diffs)
- trunk/lib/jelix/plugins/urls/significant/jSignificantUrlsCompiler.class.php (modified) (2 diffs)
- trunk/lib/jelix/plugins/urls/significant/significant.urls.php (modified) (3 diffs)
- trunk/lib/jelix/plugins/urls/significant/significant.urls.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.old_urls_generation.html.php (modified) (12 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.old_urls_generation.html.php (modified) (12 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.old_urls_parsing.html.php (modified) (2 diffs)
- trunk/testapp/modules/jelix_tests/tests/core.old_urls_parsing.html.php (modified) (2 diffs)
- trunk/testapp/var/config/urls_old.xml (modified) (4 diffs)
- trunk/testapp/var/config/urls_old.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/controllers/jControllerDaoCrud.class.php
r691 r693 120 120 protected function _getAction($method){ 121 121 global $gJCoord; 122 #ifdef ENABLE_OLD_ACTION_SELECTOR123 if($GLOBALS['gJConfig']->enableOldActionSelector == false)124 return $gJCoord->action->module.'~'.$gJCoord->action->controller.':'.$method;125 else126 return $gJCoord->action->module.'~'.$gJCoord->action->controller.'_'.$method;127 #else128 122 return $gJCoord->action->module.'~'.$gJCoord->action->controller.':'.$method; 129 #endif130 123 } 131 124 trunk/lib/jelix/controllers/jControllerDaoCrud.class.php
r691 r693 120 120 protected function _getAction($method){ 121 121 global $gJCoord; 122 #ifdef ENABLE_OLD_ACTION_SELECTOR123 if($GLOBALS['gJConfig']->enableOldActionSelector == false)124 return $gJCoord->action->module.'~'.$gJCoord->action->controller.':'.$method;125 else126 return $gJCoord->action->module.'~'.$gJCoord->action->controller.'_'.$method;127 #else128 122 return $gJCoord->action->module.'~'.$gJCoord->action->controller.':'.$method; 129 #endif130 123 } 131 124 trunk/lib/jelix/core/jConfigCompiler.class.php
r691 r693 43 43 $config->isWindows = (DIRECTORY_SEPARATOR == '\\'); 44 44 if(trim( $config->startAction) == '') { 45 #ifdef ENABLE_OLD_ACTION_SELECTOR46 if($GLOBALS['gJConfig']->enableOldActionSelector == false)47 $config->startAction = ':';48 else49 $config->startAction = '_';50 #else51 45 $config->startAction = ':'; 52 #endif 53 } 46 } 54 47 55 48 $config->_allBasePath = array(); … … 101 94 $config['isWindows'] = (DIRECTORY_SEPARATOR == '\\'); 102 95 if(trim( $config['startAction']) == '') { 103 #ifdef ENABLE_OLD_ACTION_SELECTOR104 if($GLOBALS['gJConfig']->enableOldActionSelector == false)105 $config['startAction'] = ':';106 else107 $config['startAction'] = '_';108 #else109 96 $config['startAction'] = ':'; 110 #endif111 97 } 112 98 trunk/lib/jelix/core/jConfigCompiler.class.php
r691 r693 43 43 $config->isWindows = (DIRECTORY_SEPARATOR == '\\'); 44 44 if(trim( $config->startAction) == '') { 45 #ifdef ENABLE_OLD_ACTION_SELECTOR46 if($GLOBALS['gJConfig']->enableOldActionSelector == false)47 $config->startAction = ':';48 else49 $config->startAction = '_';50 #else51 45 $config->startAction = ':'; 52 #endif 53 } 46 } 54 47 55 48 $config->_allBasePath = array(); … … 101 94 $config['isWindows'] = (DIRECTORY_SEPARATOR == '\\'); 102 95 if(trim( $config['startAction']) == '') { 103 #ifdef ENABLE_OLD_ACTION_SELECTOR104 if($GLOBALS['gJConfig']->enableOldActionSelector == false)105 $config['startAction'] = ':';106 else107 $config['startAction'] = '_';108 #else109 96 $config['startAction'] = ':'; 110 #endif111 97 } 112 98 trunk/lib/jelix/core/jCoordinator.class.php
r691 r693 181 181 $this->actionName = $gJConfig->startAction; 182 182 else { 183 #ifdef ENABLE_OLD_ACTION_SELECTOR184 if($GLOBALS['gJConfig']->enableOldActionSelector == false)185 $this->actionName = 'default:index';186 else187 $this->actionName = 'default_index';188 #else189 183 $this->actionName = 'default:index'; 190 #endif191 184 } 192 185 } trunk/lib/jelix/core/jCoordinator.class.php
r691 r693 181 181 $this->actionName = $gJConfig->startAction; 182 182 else { 183 #ifdef ENABLE_OLD_ACTION_SELECTOR184 if($GLOBALS['gJConfig']->enableOldActionSelector == false)185 $this->actionName = 'default:index';186 else187 $this->actionName = 'default_index';188 #else189 183 $this->actionName = 'default:index'; 190 #endif191 184 } 192 185 } trunk/lib/jelix/core/jSelector.class.php
r691 r693 195 195 $this->module = $module; 196 196 #ifdef ENABLE_OLD_ACTION_SELECTOR 197 if($GLOBALS['gJConfig']->enableOldActionSelector == false )197 if($GLOBALS['gJConfig']->enableOldActionSelector == false || strpos($action,':') !== false) 198 198 $separator = ':'; 199 199 else … … 210 210 $this->method = $r[1]==''?'index':$r[1]; 211 211 } 212 #ifdef ENABLE_OLD_ACTION_SELECTOR213 $this->resource = $this->controller.$separator.$this->method;214 #else215 212 $this->resource = $this->controller.':'.$this->method; 216 #endif217 213 $this->request = $request; 218 214 $this->_createPath(); … … 273 269 #if ENABLE_PHP_JELIX 274 270 #ifdef ENABLE_OLD_ACTION_SELECTOR 275 if($GLOBALS['gJConfig']->enableOldActionSelector == false ) {271 if($GLOBALS['gJConfig']->enableOldActionSelector == false || strpos($sel,':') !== false) { 276 272 $res = jelix_scan_action_sel($sel, $this, $gJCoord->actionName) 277 273 } … … 308 304 $this->resource = $m[2]; 309 305 #ifdef ENABLE_OLD_ACTION_SELECTOR 310 if($GLOBALS['gJConfig']->enableOldActionSelector == false )311 $ separator = ':';306 if($GLOBALS['gJConfig']->enableOldActionSelector == false || strpos($this->resource,':') !== false) 307 $r = explode(':',$this->resource); 312 308 else 313 $separator = '_'; 314 315 $r = explode($separator,$this->resource); 309 $r = explode('_',$this->resource); 316 310 #else 317 311 $r = explode(':',$this->resource); … … 324 318 $this->method = $r[1]==''?'index':$r[1]; 325 319 } 326 #ifdef ENABLE_OLD_ACTION_SELECTOR327 $this->resource = $this->controller.$separator.$this->method;328 #else329 320 $this->resource = $this->controller.':'.$this->method; 330 #endif 321 331 322 if($m[3] != '' && $enableRequestPart) 332 323 $this->request = $m[3]; trunk/lib/jelix/core/jSelector.class.php
r691 r693 195 195 $this->module = $module; 196 196 #ifdef ENABLE_OLD_ACTION_SELECTOR 197 if($GLOBALS['gJConfig']->enableOldActionSelector == false )197 if($GLOBALS['gJConfig']->enableOldActionSelector == false || strpos($action,':') !== false) 198 198 $separator = ':'; 199 199 else … … 210 210 $this->method = $r[1]==''?'index':$r[1]; 211 211 } 212 #ifdef ENABLE_OLD_ACTION_SELECTOR213 $this->resource = $this->controller.$separator.$this->method;214 #else215 212 $this->resource = $this->controller.':'.$this->method; 216 #endif217 213 $this->request = $request; 218 214 $this->_createPath(); … … 273 269 #if ENABLE_PHP_JELIX 274 270 #ifdef ENABLE_OLD_ACTION_SELECTOR 275 if($GLOBALS['gJConfig']->enableOldActionSelector == false ) {271 if($GLOBALS['gJConfig']->enableOldActionSelector == false || strpos($sel,':') !== false) { 276 272 $res = jelix_scan_action_sel($sel, $this, $gJCoord->actionName) 277 273 } … … 308 304 $this->resource = $m[2]; 309 305 #ifdef ENABLE_OLD_ACTION_SELECTOR 310 if($GLOBALS['gJConfig']->enableOldActionSelector == false )311 $ separator = ':';306 if($GLOBALS['gJConfig']->enableOldActionSelector == false || strpos($this->resource,':') !== false) 307 $r = explode(':',$this->resource); 312 308 else 313 $separator = '_'; 314 315 $r = explode($separator,$this->resource); 309 $r = explode('_',$this->resource); 316 310 #else 317 311 $r = explode(':',$this->resource); … … 324 318 $this->method = $r[1]==''?'index':$r[1]; 325 319 } 326 #ifdef ENABLE_OLD_ACTION_SELECTOR327 $this->resource = $this->controller.$separator.$this->method;328 #else329 320 $this->resource = $this->controller.':'.$this->method; 330 #endif 321 331 322 if($m[3] != '' && $enableRequestPart) 332 323 $this->request = $m[3]; trunk/lib/jelix/core/request/jCmdLineRequest.class.php
r691 r693 41 41 $argsel = array_shift($argv); // get the module~action selector 42 42 if ($argsel == 'help') { 43 #ifdef ENABLE_OLD_ACTION_SELECTOR44 if($GLOBALS['gJConfig']->enableOldActionSelector == false)45 $argsel = 'jelix~help:index';46 else47 $argsel = 'jelix~help_index';48 #else49 43 $argsel = 'jelix~help:index'; 50 #endif51 44 } 52 45 if (!preg_match('/(?:([\w\.]+)~)/', $argsel)) { trunk/lib/jelix/core/request/jCmdLineRequest.class.php
r691 r693 41 41 $argsel = array_shift($argv); // get the module~action selector 42 42 if ($argsel == 'help') { 43 #ifdef ENABLE_OLD_ACTION_SELECTOR44 if($GLOBALS['gJConfig']->enableOldActionSelector == false)45 $argsel = 'jelix~help:index';46 else47 $argsel = 'jelix~help_index';48 #else49 43 $argsel = 'jelix~help:index'; 50 #endif51 44 } 52 45 if (!preg_match('/(?:([\w\.]+)~)/', $argsel)) { trunk/lib/jelix/plugins/urls/significant/jSignificantUrlsCompiler.class.php
r691 r693 134 134 135 135 $action = (string)$url['action']; 136 #ifdef ENABLE_OLD_ACTION_SELECTOR 137 if($GLOBALS['gJConfig']->enableOldActionSelector == false) 138 $separator = ':'; 139 else 140 $separator = '_'; 141 142 if (strpos($action, $separator) === false) { 143 $action = 'default'.$separator.$action; 144 } 145 146 if(isset($url['actionoverride'])){ 147 $actionOverride = preg_split("/[\s,]+/", (string)$url['actionoverride']); 148 foreach ($actionOverride as &$each) { 149 if (strpos($each, $separator) === false) { 150 $each = 'default'.$separator.$each; 151 #else 136 152 137 if (strpos($action, ':') === false) { 153 138 $action = 'default:'.$action; … … 159 144 if (strpos($each, ':') === false) { 160 145 $each = 'default:'.$each; 161 #endif162 146 } 163 147 } trunk/lib/jelix/plugins/urls/significant/jSignificantUrlsCompiler.class.php
r691 r693 134 134 135 135 $action = (string)$url['action']; 136 #ifdef ENABLE_OLD_ACTION_SELECTOR 137 if($GLOBALS['gJConfig']->enableOldActionSelector == false) 138 $separator = ':'; 139 else 140 $separator = '_'; 141 142 if (strpos($action, $separator) === false) { 143 $action = 'default'.$separator.$action; 144 } 145 146 if(isset($url['actionoverride'])){ 147 $actionOverride = preg_split("/[\s,]+/", (string)$url['actionoverride']); 148 foreach ($actionOverride as &$each) { 149 if (strpos($each, $separator) === false) { 150 $each = 'default'.$separator.$each; 151 #else 136 152 137 if (strpos($action, ':') === false) { 153 138 $action = 'default:'.$action; … … 159 144 if (strpos($each, ':') === false) { 160 145 $each = 'default:'.$each; 161 #endif162 146 } 163 147 } trunk/lib/jelix/plugins/urls/significant/significant.urls.php
r691 r693 170 170 // et qu'elle fait partie des actions secondaires, alors on la laisse 171 171 // sinon on prend celle indiquée dans la conf 172 if( $infoparsing[3] 173 && isset($params['action']) 174 && in_array($params['action'], $infoparsing[3])){ 175 176 $url->params['action']=$params['action']; // action peut avoir été écrasé par une itération précédente 172 if ($infoparsing[3] && isset($params['action'])) { 173 #ifdef ENABLE_OLD_ACTION_SELECTOR 174 if(strpos($params['action'], ':') === false) { 175 if(!$gJConfig->enableOldActionSelector || strpos($params['action'], '_') === false) { 176 $params['action'] = 'default:'.$params['action']; 177 } else if($gJConfig->enableOldActionSelector && strpos($params['action'], '_') !== false) { 178 $params['action'] = str_replace("_",":",$params['action']); 179 } 180 } 181 #else 182 if(strpos($params['action'], ':') === false) { 183 $params['action'] = 'default:'.$params['action']; 184 } 185 #endif 186 if(in_array($params['action'], $infoparsing[3])) 187 $url->params['action']=$params['action']; // action peut avoir été écrasé par une itération précédente 188 else 189 $url->params['action']=$infoparsing[1]; 177 190 }else{ 178 191 $url->params['action']=$infoparsing[1]; … … 197 210 // et qu'elle fait partie des actions secondaires, alors on la laisse 198 211 // sinon on prend celle indiquée dans la conf 199 if( !($infoparsing[6] 200 && isset($params['action']) 201 && in_array($params['action'], $infoparsing[6]))){ 202 212 213 if($infoparsing[6] && isset($params['action']) ) { 214 #ifdef ENABLE_OLD_ACTION_SELECTOR 215 if(strpos($params['action'], ':') === false) { 216 if(!$gJConfig->enableOldActionSelector || strpos($params['action'], '_') === false) { 217 $params['action'] = 'default:'.$params['action']; 218 } else if($gJConfig->enableOldActionSelector && strpos($params['action'], '_') !== false) { 219 $params['action'] = str_replace("_",":",$params['action']); 220 } 221 } 222 #else 223 if(strpos($params['action'], ':') === false) { 224 $params['action'] = 'default:'.$params['action']; 225 } 226 #endif 227 if(!in_array($params['action'], $infoparsing[6]) && $infoparsing[1] !='') { 228 $params['action']=$infoparsing[1]; 229 } 230 231 } else { 203 232 if($infoparsing[1] !='') 204 233 $params['action']=$infoparsing[1]; … … 231 260 $urlact = jUrl::get($gJConfig->urlengine['notfoundAct'],array(),jUrl::JURLACTION); 232 261 }catch(Exception $e){ 233 #ifdef ENABLE_OLD_ACTION_SELECTOR234 if($gJConfig->enableOldActionSelector)235 $urlact = new jUrlAction(array('module'=>'jelix', 'action'=>'error_notfound'));236 else237 $urlact = new jUrlAction(array('module'=>'jelix', 'action'=>'error:notfound'));238 #else239 262 $urlact = new jUrlAction(array('module'=>'jelix', 'action'=>'error:notfound')); 240 #endif241 263 } 242 264 }else if(!$urlact && $isDefault){ trunk/lib/jelix/plugins/urls/significant/significant.urls.php
r691 r693 170 170 // et qu'elle fait partie des actions secondaires, alors on la laisse 171 171 // sinon on prend celle indiquée dans la conf 172 if( $infoparsing[3] 173 && isset($params['action']) 174 && in_array($params['action'], $infoparsing[3])){ 175 176 $url->params['action']=$params['action']; // action peut avoir été écrasé par une itération précédente 172 if ($infoparsing[3] && isset($params['action'])) { 173 #ifdef ENABLE_OLD_ACTION_SELECTOR 174 if(strpos($params['action'], ':') === false) { 175 if(!$gJConfig->enableOldActionSelector || strpos($params['action'], '_') === false) { 176 $params['action'] = 'default:'.$params['action']; 177 } else if($gJConfig->enableOldActionSelector && strpos($params['action'], '_') !== false) { 178 $params['action'] = str_replace("_",":",$params['action']); 179 } 180 } 181 #else 182 if(strpos($params['action'], ':') === false) { 183 $params['action'] = 'default:'.$params['action']; 184 } 185 #endif 186 if(in_array($params['action'], $infoparsing[3])) 187 $url->params['action']=$params['action']; // action peut avoir été écrasé par une itération précédente 188 else 189 $url->params['action']=$infoparsing[1]; 177 190 }else{ 178 191 $url->params['action']=$infoparsing[1]; … … 197 210 // et qu'elle fait partie des actions secondaires, alors on la laisse 198 211 // sinon on prend celle indiquée dans la conf 199 if( !($infoparsing[6] 200 && isset($params['action']) 201 && in_array($params['action'], $infoparsing[6]))){ 202 212 213 if($infoparsing[6] && isset($params['action']) ) { 214 #ifdef ENABLE_OLD_ACTION_SELECTOR 215 if(strpos($params['action'], ':') === false) { 216 if(!$gJConfig->enableOldActionSelector || strpos($params['action'], '_') === false) { 217 $params['action'] = 'default:'.$params['action']; 218 } else if($gJConfig->enableOldActionSelector && strpos($params['action'], '_') !== false) { 219 $params['action'] = str_replace("_",":",$params['action']); 220 } 221 } 222 #else 223 if(strpos($params['action'], ':') === false) { 224 $params['action'] = 'default:'.$params['action']; 225 } 226 #endif 227 if(!in_array($params['action'], $infoparsing[6]) && $infoparsing[1] !='') { 228 $params['action']=$infoparsing[1]; 229 } 230 231 } else { 203 232 if($infoparsing[1] !='') 204 233 $params['action']=$infoparsing[1]; … … 231 260 $urlact = jUrl::get($gJConfig->urlengine['notfoundAct'],array(),jUrl::JURLACTION); 232 261 }catch(Exception $e){ 233 #ifdef ENABLE_OLD_ACTION_SELECTOR234 if($gJConfig->enableOldActionSelector)235 $urlact = new jUrlAction(array('module'=>'jelix', 'action'=>'error_notfound'));236 else237 $urlact = new jUrlAction(array('module'=>'jelix', 'action'=>'error:notfound'));238 #else239 262 $urlact = new jUrlAction(array('module'=>'jelix', 'action'=>'error:notfound')); 240 #endif241 263 } 242 264 }else if(!$urlact && $isDefault){ trunk/testapp/modules/jelix_tests/tests/core.old_urls_generation.html.php
r691 r693 30 30 $this->oldActionSelector = $gJConfig->enableOldActionSelector; 31 31 $gJConfig->enableOldActionSelector = true; 32 $gJConfig->simple_urlengine_entrypoints['testnews'] = "jelix_tests~urlsig _url2@classic jelix_tests~urlsig_url3@classic";33 $gJConfig->simple_urlengine_entrypoints['foo/bar'] = "jelix_tests~urlsig _url4@classic";32 $gJConfig->simple_urlengine_entrypoints['testnews'] = "jelix_tests~urlsig:url2@classic jelix_tests~urlsig:url3@classic"; 33 $gJConfig->simple_urlengine_entrypoints['foo/bar'] = "jelix_tests~urlsig:url4@classic"; 34 34 } 35 35 … … 107 107 'entrypointExtension'=>'.php', 108 108 'notfoundAct'=>'jelix~notfound', 109 'simple_urlengine_https'=>'jelix_tests~urlsig _url8@classic @xmlrpc',109 'simple_urlengine_https'=>'jelix_tests~urlsig:url8@classic @xmlrpc', 110 110 'significantFile'=>'urls_old.xml', 111 111 ); … … 130 130 131 131 $trueResult=array( 132 "/index.php?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig _url1",133 "/testnews.php?mois=05&annee=2004&module=jelix_tests&action=urlsig _url2",134 "/testnews.php?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig _url3",135 "/foo/bar.php?first=premier&second=deuxieme&module=jelix_tests&action=urlsig _url4",136 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig _url5",132 "/index.php?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig:url1", 133 "/testnews.php?mois=05&annee=2004&module=jelix_tests&action=urlsig:url2", 134 "/testnews.php?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig:url3", 135 "/foo/bar.php?first=premier&second=deuxieme&module=jelix_tests&action=urlsig:url4", 136 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig:url5", 137 137 "/xmlrpc.php", 138 "/index.php?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig _url8",138 "/index.php?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig:url8", 139 139 ); 140 140 … … 147 147 jUrl::getEngine(true); // on recharge le nouveau moteur d'url 148 148 $trueResult=array( 149 "/index?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig _url1",150 "/testnews?mois=05&annee=2004&module=jelix_tests&action=urlsig _url2",151 "/testnews?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig _url3",152 "/foo/bar?first=premier&second=deuxieme&module=jelix_tests&action=urlsig _url4",153 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig _url5",149 "/index?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig:url1", 150 "/testnews?mois=05&annee=2004&module=jelix_tests&action=urlsig:url2", 151 "/testnews?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig:url3", 152 "/foo/bar?first=premier&second=deuxieme&module=jelix_tests&action=urlsig:url4", 153 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig:url5", 154 154 "/xmlrpc", 155 "/index?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig _url8",155 "/index?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig:url8", 156 156 ); 157 157 $trueResult[5]='https://'.$_SERVER['HTTP_HOST'].$trueResult[5]; … … 176 176 'defaultEntrypoint'=>'index', 177 177 'entrypointExtension'=>'.php', 178 'notfoundAct'=>'jelix~ notfound',179 'simple_urlengine_https'=>'jelix_tests~urlsig _url8@classic @xmlrpc',178 'notfoundAct'=>'jelix~error:notfound', 179 'simple_urlengine_https'=>'jelix_tests~urlsig:url8@classic @xmlrpc', 180 180 'significantFile'=>'urls_old.xml', 181 181 ); … … 218 218 'defaultEntrypoint'=>'index', 219 219 'entrypointExtension'=>'.php', 220 'notfoundAct'=>'jelix~ notfound',220 'notfoundAct'=>'jelix~error:notfound', 221 221 'significantFile'=>'urls_old.xml', 222 222 ); … … 229 229 $urlList=array(); 230 230 $urlList[]= array('urlsig_url1', array('mois'=>'10', 'annee'=>'2005', 'id'=>'01')); 231 $urlList[]= array('urlsig:url1', array('mois'=>'10', 'annee'=>'2005', 'id'=>'01')); 231 232 $urlList[]= array('urlsig_url9', array('mois'=>'10', 'annee'=>'2005', 'id'=>'09')); 233 $urlList[]= array('urlsig:url9', array('mois'=>'10', 'annee'=>'2005', 'id'=>'09')); 232 234 $urlList[]= array('urlsig_url10', array('mois'=>'10', 'annee'=>'2005', 'id'=>'10')); 233 235 $urlList[]= array('urlsig_url2', array('mois'=>'05', 'annee'=>'2004')); … … 253 255 $trueResult=array( 254 256 "/index.php/test/news/2005/10/01", 255 "/index.php/test/news/2005/10/09?action=urlsig_url9", 256 "/index.php/test/news/2005/10/10?action=urlsig_url10", 257 "/index.php/test/news/2005/10/01", 258 "/index.php/test/news/2005/10/09?action=urlsig:url9", 259 "/index.php/test/news/2005/10/09?action=urlsig:url9", 260 "/index.php/test/news/2005/10/10?action=urlsig:url10", 257 261 "/testnews.php/2004/05", 258 262 "/index.php/test/cms/actualite/65-c-est-la-fete-au-village", 259 263 "/test/cms2/actualite/65", 260 264 "/foo/bar.php/withhandler/premier/deuxieme", 261 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig _url5",265 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig:url5", 262 266 "/xmlrpc.php", 263 "/news.php?aaa=bbb&action=default _bar",264 "/index.php/test/news/2007/23/74?action=urlsig _url8",267 "/news.php?aaa=bbb&action=default:bar", 268 "/index.php/test/news/2007/23/74?action=urlsig:url8", 265 269 "/index.php/shop/vetements/98", 266 270 "/index.php/shop/bricolage/53/", … … 275 279 ); 276 280 277 $trueResult[1 1]='https://'.$_SERVER['HTTP_HOST'].$trueResult[11];281 $trueResult[13]='https://'.$_SERVER['HTTP_HOST'].$trueResult[13]; 278 282 $this->_doCompareUrl("significant, multiview = false", $urlList,$trueResult); 279 283 … … 282 286 $trueResult=array( 283 287 "/index/test/news/2005/10/01", 284 "/index/test/news/2005/10/09?action=urlsig_url9", 285 "/index/test/news/2005/10/10?action=urlsig_url10", 288 "/index/test/news/2005/10/01", 289 "/index/test/news/2005/10/09?action=urlsig:url9", 290 "/index/test/news/2005/10/09?action=urlsig:url9", 291 "/index/test/news/2005/10/10?action=urlsig:url10", 286 292 "/testnews/2004/05", 287 293 "/index/test/cms/actualite/65-c-est-la-fete-au-village", 288 294 "/test/cms2/actualite/65", 289 295 "/foo/bar/withhandler/premier/deuxieme", 290 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig _url5",296 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig:url5", 291 297 "/xmlrpc", 292 "/news?aaa=bbb&action=default _bar",293 "/index/test/news/2007/23/74?action=urlsig _url8",298 "/news?aaa=bbb&action=default:bar", 299 "/index/test/news/2007/23/74?action=urlsig:url8", 294 300 "/index/shop/vetements/98", 295 301 "/index/shop/bricolage/53/", … … 303 309 "/index/hello3", 304 310 ); 305 $trueResult[1 1]='https://'.$_SERVER['HTTP_HOST'].$trueResult[11];311 $trueResult[13]='https://'.$_SERVER['HTTP_HOST'].$trueResult[13]; 306 312 $this->_doCompareUrl("significant, multiview = true", $urlList,$trueResult); 307 313 … … 348 354 ); 349 355 $this->_doCompareError("significant, errors multiview = true", $urlList,$trueResult); 350 351 352 } 353 354 355 356 356 } 357 357 } 358 358 ?> trunk/testapp/modules/jelix_tests/tests/core.old_urls_generation.html.php
r691 r693 30 30 $this->oldActionSelector = $gJConfig->enableOldActionSelector; 31 31 $gJConfig->enableOldActionSelector = true; 32 $gJConfig->simple_urlengine_entrypoints['testnews'] = "jelix_tests~urlsig _url2@classic jelix_tests~urlsig_url3@classic";33 $gJConfig->simple_urlengine_entrypoints['foo/bar'] = "jelix_tests~urlsig _url4@classic";32 $gJConfig->simple_urlengine_entrypoints['testnews'] = "jelix_tests~urlsig:url2@classic jelix_tests~urlsig:url3@classic"; 33 $gJConfig->simple_urlengine_entrypoints['foo/bar'] = "jelix_tests~urlsig:url4@classic"; 34 34 } 35 35 … … 107 107 'entrypointExtension'=>'.php', 108 108 'notfoundAct'=>'jelix~notfound', 109 'simple_urlengine_https'=>'jelix_tests~urlsig _url8@classic @xmlrpc',109 'simple_urlengine_https'=>'jelix_tests~urlsig:url8@classic @xmlrpc', 110 110 'significantFile'=>'urls_old.xml', 111 111 ); … … 130 130 131 131 $trueResult=array( 132 "/index.php?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig _url1",133 "/testnews.php?mois=05&annee=2004&module=jelix_tests&action=urlsig _url2",134 "/testnews.php?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig _url3",135 "/foo/bar.php?first=premier&second=deuxieme&module=jelix_tests&action=urlsig _url4",136 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig _url5",132 "/index.php?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig:url1", 133 "/testnews.php?mois=05&annee=2004&module=jelix_tests&action=urlsig:url2", 134 "/testnews.php?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig:url3", 135 "/foo/bar.php?first=premier&second=deuxieme&module=jelix_tests&action=urlsig:url4", 136 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig:url5", 137 137 "/xmlrpc.php", 138 "/index.php?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig _url8",138 "/index.php?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig:url8", 139 139 ); 140 140 … … 147 147 jUrl::getEngine(true); // on recharge le nouveau moteur d'url 148 148 $trueResult=array( 149 "/index?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig _url1",150 "/testnews?mois=05&annee=2004&module=jelix_tests&action=urlsig _url2",151 "/testnews?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig _url3",152 "/foo/bar?first=premier&second=deuxieme&module=jelix_tests&action=urlsig _url4",153 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig _url5",149 "/index?mois=10&annee=2005&id=35&module=jelix_tests&action=urlsig:url1", 150 "/testnews?mois=05&annee=2004&module=jelix_tests&action=urlsig:url2", 151 "/testnews?rubrique=actualite&id_art=65&article=c%27est+la+f%C3%AAte+au+village&module=jelix_tests&action=urlsig:url3", 152 "/foo/bar?first=premier&second=deuxieme&module=jelix_tests&action=urlsig:url4", 153 "/index?foo=oof&bar=rab&module=jelix_tests&action=urlsig:url5", 154 154 "/xmlrpc", 155 "/index?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig _url8",155 "/index?rubrique=vetements&id_article=98&module=jelix_tests&action=urlsig:url8", 156 156 ); 157 157 $trueResult[5]='https://'.$_SERVER['HTTP_HOST'].$trueResult[5]; … … 176 176 'defaultEntrypoint'=>'index', 177 177 'entrypointExtension'=>'.php', 178 'notfoundAct'=>'jelix~ notfound',179 'simple_urlengine_https'=>'jelix_tests~urlsig _url8@classic @xmlrpc',178 'notfoundAct'=>'jelix~error:notfound', 179 'simple_urlengine_https'=>'jelix_tests~urlsig:url8@classic @xmlrpc', 180 180 'significantFile'=>'urls_old.xml', 181 181 ); … … 218 218 'defaultEntrypoint'=>'index', 219 219 'entrypointExtension'=>'.php', 220 'notfoundAct'=>'jelix~ notfound',220 'notfoundAct'=>'jelix~error:notfound', 221 221 'significantFile'=>'urls_old.xml', 222 222 ); … … 229 229 $urlList=array(); 230 230 $urlList[]= array('urlsig_url1', array('mois'=>'10', 'annee'=>'2005', 'id'=>'01')); 231 $urlList[]= array('urlsig:url1', array('mois'=>'10', 'annee'=>'2005', 'id'=>'01')); 231 232 $urlList[]= array('urlsig_url9', array('mois'=>'10', 'annee'=>'2005', 'id'=>'09')); 233 $urlList[]= array('urlsig:url9', array('mois'=>'10', 'annee'=>'2005', 'id'=>'09')); 232 234 $urlList[]= array('urlsig_url10', array('mois'=>'10', 'annee'=>'2005', 'id'=>'10')); 233 235 $urlList[]= array('urlsig_url2', array('mois'=>'05', 'annee'=>'2004')); … … 253 255 $trueResult=array( 254 256 "/index.php/test/news/2005/10/01", 255 "/index.php/test/news/2005/10/09?action=urlsig_url9", 256 "/index.php/test/news/2005/10/10?action=urlsig_url10", 257 "/index.php/test/news/2005/10/01", 258 "/index.php/test/news/2005/10/09?action=urlsig:url9", 259 "/index.php/test/news/2005/10/09?action=urlsig:url9", 260 "/index.php/test/news/2005/10/10?action=urlsig:url10", 257 261 "/testnews.php/2004/05", 258 262 "/index.php/test/cms/actualite/65-c-est-la-fete-au-village", 259 263 "/test/cms2/actualite/65", 260 264 "/foo/bar.php/withhandler/premier/deuxieme", 261 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig _url5",265 "/index.php?foo=oof&bar=rab&module=jelix_tests&action=urlsig:url5", 262 266 "/xmlrpc.php", 263 "/news.php?aaa=bbb&action=default _bar",264 "/index.php/test/news/2007/23/74?action=urlsig _url8",267 "/news.php?aaa=bbb&action=default:bar", 268 "/index.php/test/news/2007/23/74?action=urlsig:url8", 265 269 "/index.php/shop/vetements/98", 266 270 "/index.php/shop/bricolage/53/", … … 275 279 ); 276 280 277 $trueResult[1 1]='https://'.$_SERVER['HTTP_HOST'].$trueResult[11];281 $trueResult[13]='https://'.$_SERVER['HTTP_HOST'].$trueResult[13]; 278 282 $this->_doCompareUrl("significant, multiview = false", $urlList,$trueResult); 279 283 … … 282 286 $trueResult=array( 283 287 "/index/test/news/2005/10/01", 284 "/index/test/news/2005/10/09?action=urlsig_url9", 285 "/index/test/news/2005/10/10?action=urlsig_url10", 288
