Changeset 336
- Timestamp:
- 12/20/06 10:38:12 (2 years ago)
- Files:
-
- trunk/lib/jelix/core/jSelector.class.php (modified) (3 diffs)
- trunk/lib/jelix/core/url/jUrl.class.php (modified) (2 diffs)
- trunk/testapp/modules/unittest/classes/utselectoract.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/core/jSelector.class.php
r334 r336 170 170 * Action selector 171 171 * 172 * main syntax: "module~action :requestType". module should be a valid module name or # (#=says to get172 * main syntax: "module~action@requestType". module should be a valid module name or # (#=says to get 173 173 * the module of the current request). action should be an action name (controller_method). 174 174 * all part are optional, but it should have one part at least. … … 183 183 protected $_dirname='actions/'; 184 184 185 function __construct($sel){ 185 /** 186 * @param string $sel the selector 187 * @param boolean $enableRequestPart true if the selector can contain the request part 188 */ 189 function __construct($sel, $enableRequestPart = false){ 186 190 global $gJCoord; 187 191 … … 211 215 } 212 216 $this->resource = $this->controller.'_'.$this->method; 213 if($m[3] != '' )217 if($m[3] != '' && $enableRequestPart) 214 218 $this->request = $m[3]; 215 219 else trunk/lib/jelix/core/url/jUrl.class.php
r334 r336 258 258 static function get ($actSel, $params = array (), $what=0) { 259 259 260 $sel = new JSelectorAct($actSel);260 $sel = new jSelectorAct($actSel,true); 261 261 $params['module'] = $sel->module; 262 262 $params['action'] = $sel->resource; … … 290 290 */ 291 291 static function getAction ($actionSelector){ 292 $sel = new JSelectorAct($actionSelector);292 $sel = new jSelectorAct($actionSelector,true); 293 293 return array('module'=>$sel->module, 'action'=>$sel->resource, 'request'=>$sel->request); 294 294 } trunk/testapp/modules/unittest/classes/utselectoract.class.php
r231 r336 89 89 $valid=true; 90 90 try{ 91 $s = new jSelectorAct($sel );91 $s = new jSelectorAct($sel, true); 92 92 }catch(jExceptionSelector $e){ 93 93 $valid=false;
