Changeset 278

Show
Ignore:
Timestamp:
12/19/06 17:09:53 (2 years ago)
Author:
scorfield
Message:

Addresses #95 by allowing new-style lexicons to specify a leading / and therefore
treat the lexicon path as a root-relative or mapped path (instead of being below
the lexicons/ directory inside the application root).

Location:
framework/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/fuseboxApplication.cfc

    r277 r278  
    9393                                        hint="I am the myFusebox data structure." /> 
    9494                 
    95                 <!--- fixed ticket 73 ---> 
     95                <!--- partial fix for ticket 95 ---> 
    9696                <cfset var myVersion = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#" /> 
    9797 
     
    746746                                                        detail="You have attempted to declare a namespace '#aLex.namespace#' (in fusebox.xml) which is reserved by the Fusebox framework." /> 
    747747                                </cfif> 
    748                                 <cfset aLex.path = getApplication().getCoreToAppRootPath() & getApplication().lexiconPath & attributes[attr] /> 
     748                                <cfset attributes[attr] = replace(attributes[attr],"\","/","all") /> 
     749                                <cfif left(attributes[attr],1) is "/"> 
     750                                        <!--- assume mapped / root-relative path ---> 
     751                                        <cfset aLex.path = attributes[attr] /> 
     752                                <cfelse> 
     753                                        <cfset aLex.path = getApplication().getCoreToAppRootPath() & getApplication().lexiconPath & attributes[attr] /> 
     754                                </cfif> 
     755                                <cfif right(aLex.path,1) is not "/"> 
     756                                        <cfset aLex.path = aLex.path & "/" /> 
     757                                </cfif> 
    749758                                <cfset variables.lexicons[aLex.namespace] = aLex /> 
    750759                                <cfset variables.customAttributes[aLex.namespace] = structNew() /> 
  • framework/trunk/fuseboxCircuit.cfc

    r269 r278  
    446446                                                        detail="You have attempted to declare a namespace '#aLex.namespace#' (in Circuit #getAlias()#) which is reserved by the Fusebox framework." /> 
    447447                                </cfif> 
    448                                 <cfset aLex.path = variables.fuseboxApplication.getCoreToAppRootPath() & variables.fuseboxApplication.lexiconPath & attributes[attr] /> 
     448                                <cfset attributes[attr] = replace(attributes[attr],"\","/","all") /> 
     449                                <cfif left(attributes[attr],1) is "/"> 
     450                                        <!--- assume mapped / root-relative path ---> 
     451                                        <cfset aLex.path = attributes[attr] /> 
     452                                <cfelse> 
     453                                        <cfset aLex.path = variables.fuseboxApplication.getCoreToAppRootPath() & variables.fuseboxApplication.lexiconPath & attributes[attr] /> 
     454                                </cfif> 
     455                                <cfif right(aLex.path,1) is not "/"> 
     456                                        <cfset aLex.path = aLex.path & "/" /> 
     457                                </cfif> 
    449458                                <cfset variables.lexicons[aLex.namespace] = aLex /> 
    450459                                <cfset variables.customAttributes[aLex.namespace] = structNew() /> 
  • framework/trunk/myFusebox.cfc

    r277 r278  
    5151<cfcomponent hint="I provide the per-request myFusebox data structure and some convenience methods."> 
    5252        <cfscript> 
    53         // fixed ticket 73 
     53        // partial fix for ticket 95 
    5454        this.version.runtime     = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#"; 
    5555