Show
Ignore:
Timestamp:
12/21/06 12:20:33 (2 years ago)
Author:
scorfield
Message:

Addresses #95 by allowing fusebox.xml parameter overrides for lexiconPath and errortemplatesPath
and both of those can be relative (to the application root) or absolute / mapped. In addition
lexicons can now be relative (to the lexicon path) or absolute / mapped.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/fuseboxCircuit.cfc

    r281 r282  
    189189                                 
    190190                        </cftry> 
     191<!---            
     192                        this was initially implemented as part of ticket 135 but feedback on 
     193                        the mailing list seems to indicate people think it is too draconian 
     194                        a restriction, even in strict mode - and I agree! -- Sean Corfield 
    191195                         
    192196                        <cfif variables.fuseboxApplication.strictMode and not circuitImplicit and 
     
    196200                                                detail="The circuit xml file, #circuitFile#, in #variables.fullPath#, uses a different file extension to the application's fusebox xml file. Strict requires consistency." /> 
    197201                        </cfif> 
    198                          
     202 --->                    
    199203                        <cftry> 
    200204                                 
     
    466470                                                        detail="You have attempted to declare a namespace '#aLex.namespace#' (in Circuit #getAlias()#) which is reserved by the Fusebox framework." /> 
    467471                                </cfif> 
    468                                 <cfset attributes[attr] = replace(attributes[attr],"\","/","all") /> 
     472                                <cfset attributes[attr] = variables.fuseboxApplication.normalizePartialPath(attributes[attr]) /> 
    469473                                <cfif left(attributes[attr],1) is "/"> 
    470474                                        <!--- assume mapped / root-relative path ---> 
    471475                                        <cfset aLex.path = attributes[attr] /> 
     476                                <cfelseif left(variables.fuseboxApplication.lexiconPath,1) is "/"> 
     477                                        <!--- assume mapped / root-relative path ---> 
     478                                        <cfset aLex.path = variables.fuseboxApplication.lexiconPath & attributes[attr] /> 
    472479                                <cfelse> 
    473                                         <cfset aLex.path = variables.fuseboxApplication.getCoreToAppRootPath() & variables.fuseboxApplication.lexiconPath & attributes[attr] /> 
    474                                 </cfif> 
    475                                 <cfif right(aLex.path,1) is not "/"> 
    476                                         <cfset aLex.path = aLex.path & "/" /> 
     480                                        <!--- relative paths ---> 
     481                                        <cfset aLex.path = variables.fuseboxApplication.getCoreToAppRootPath() &  
     482                                                        variables.fuseboxApplication.lexiconPath & attributes[attr] /> 
    477483                                </cfif> 
    478484                                <cfset variables.lexicons[aLex.namespace] = aLex />