Changeset 253

Show
Ignore:
Timestamp:
11/03/06 20:02:31 (2 years ago)
Author:
scorfield
Message:

Fixes #162 by testing template name and reverting to FB4.1 behavior if it contains #..#
i.e., it is dynamically evaluated. Added a test case for it.

Location:
framework/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/skeleton/controller/circuit.xml.cfm

    r127 r253  
    4242        </fuseaction> 
    4343         
     44        <!-- 
     45                A number of test cases for bugs in Fusebox 5.0.0 that have been fixed 
     46        --> 
     47        <fuseaction name="ticket162"> 
     48                <set name="temp" value="NONEXISTENTFILE" /> 
     49                <!-- this works in FB4.x but throws an exception in FB5.0.0 --> 
     50                <include template="#temp#.cfm" required="false" /> 
     51                <do action="welcome" /> 
     52        </fuseaction> 
     53         
    4454</circuit> 
  • framework/trunk/verbs/include.cfm

    r202 r253  
    142142                        fb_.template = fb_.verbInfo.attributes.template; 
    143143                } 
     144                if (find('##',fb_.template) gt 0) { 
     145                        fb_.templateLen = 'len("#fb_.template#")'; 
     146                } else { 
     147                        fb_.templateLen = len(fb_.template); 
     148                } 
    144149                 
    145150                if (fb_.app.debug) { 
     
    175180                        fb_appendLine('<cfoutput><cfinclude template="#fb_.verbInfo.action.getCircuit().getApplication().parseRootPath##fb_.targetCircuit.getRelativePath()##fb_.template#"></cfoutput>'); 
    176181                } 
    177                 fb_appendLine('<cfcatch type="missingInclude"><cfif len(cfcatch.MissingFileName) gte #len(fb_.template)# and right(cfcatch.MissingFileName,#len(fb_.template)#) is "#fb_.template#">'); 
     182                fb_appendLine('<cfcatch type="missingInclude"><cfif len(cfcatch.MissingFileName) gte #fb_.templateLen# and right(cfcatch.MissingFileName,#fb_.templateLen#) is "#fb_.template#">'); 
    178183                if (fb_.verbInfo.attributes.required) { 
    179184                        fb_appendLine('<cfthrow type="fusebox.missingFuse" message="missing Fuse" ' &