Changeset 1589
- Timestamp:
- 06/26/08 23:27:17 (7 months ago)
- Files:
-
- coldbox/trunk/system/beans/requestContext.cfc (modified) (1 diff)
- coldbox/trunk/system/interceptors/ses.cfc (modified) (2 diffs)
- coldbox/trunk/testharness/config/routes.cfm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
coldbox/trunk/system/beans/requestContext.cfc
r1577 r1589 360 360 361 361 <cffunction name="buildLink" access="public" output="false" returntype="any" hint="Builds a link to a passed event, either SES or normal link. If the ses interceptor is declared it will create routes."> 362 <cfargument name="linkto" required="true" type="string" hint="The event or route you want to create the link to"> 362 <cfargument name="linkto" required="true" type="string" hint="The event or route you want to create the link to"> 363 <cfargument name="translate" required="false" type="boolean" default="true" hint="Translate between . and / depending on the ses mode. So you can just use dot notation."/> 363 364 <cfscript> 364 365 if( isSES() ){ 366 /* Translate link */ 367 if( arguments.translate ){ 368 arguments.linkto = replace(arguments.linkto,".","/","all"); 369 } 370 /* Prepare link */ 365 371 if( right(getSESbaseURL(),1) eq "/"){ 366 372 return getSESBaseURL() & arguments.linkto; coldbox/trunk/system/interceptors/ses.cfc
r1583 r1589 46 46 catch(Any e){ 47 47 throw("Error including config file: #e.message#",e.detail,"interceptors.ses.executingConfigException"); 48 } 49 50 /* Loose Matching Property: default = false */ 51 if( not propertyExists('looseMatching') or not isBoolean(getProperty('looseMatching')) ){ 52 setProperty('looseMatching',false); 48 53 } 49 54 … … 255 260 <!--- Try to match this route against the URL ---> 256 261 <cfset match = REFindNoCase(thisPattern,requestString,1,true) /> 257 262 258 263 <!--- If a match was made, use the result to route the request ---> 259 <cfif match.len[1] IS NOT 0 AND match.pos[1] EQ 1> 264 <cfif (match.len[1] IS NOT 0 AND getProperty('looseMatching')) OR 265 (not getProperty('looseMatching') and match.len[1] IS NOT 0 and match.pos[1] EQ 1) > 260 266 <cfset foundRoute = thisRoute /> 261 267 <!--- For each part of the URL in the route ---> coldbox/trunk/testharness/config/routes.cfm
r1578 r1589 107 107 108 108 <!--- CUSTOM COURSES GO HERE (they will be checked in order) ---> 109 <cfset addCourse(pattern="test/:id-numeric/:name ",handler="ehGeneral",action="dspHello")>110 <cfset addCourse(pattern="test/:id/:name ",handler="ehGeneral",action="dspHello")>109 <cfset addCourse(pattern="test/:id-numeric/:name?",handler="ehGeneral",action="dspHello")> 110 <cfset addCourse(pattern="test/:id/:name?",handler="ehGeneral",action="dspHello")> 111 111 112 112 <!--- STANDARD COLDBOX COURSES, DO NOT MODIFY UNLESS YOU DON'T LIKE THEM --->
