Changeset 293

Show
Ignore:
Timestamp:
12/25/06 15:16:36 (2 years ago)
Author:
scorfield
Message:

Fixes #54 by adding the optional FUSEBOX_CALLER_PATH variable.

Location:
framework/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/fusebox5.cfm

    r292 r293  
    2020<!--- FB5: application key - FB41 always uses 'fusebox': ---> 
    2121<cfparam name="variables.FUSEBOX_APPLICATION_KEY" default="fusebox" /> 
     22<!--- FB5.1: allow application to be included from other directories: ---> 
     23<cfparam name="variables.FUSEBOX_CALLER_PATH" default="#replace(getDirectoryFromPath(getBaseTemplatePath()),"\","/","all")#" /> 
    2224 
    2325<cfparam name="variables.attributes" default="#structNew()#" /> 
     
    4648                                <cfset myFusebox.trace("Fusebox","Creating Fusebox application object") /> 
    4749                                <cfset _fba = createObject("component","fuseboxApplication") /> 
    48                                 <cfset application[FUSEBOX_APPLICATION_KEY] = _fba.init(FUSEBOX_APPLICATION_KEY,FUSEBOX_APPLICATION_PATH,myFusebox) /> 
     50                                <cfset application[FUSEBOX_APPLICATION_KEY] = _fba.init(FUSEBOX_APPLICATION_KEY,FUSEBOX_APPLICATION_PATH,myFusebox,FUSEBOX_CALLER_PATH) /> 
    4951                        <cfelse> 
    5052                                <!--- can't be conditional: we don't know the state of the debug flag yet ---> 
  • framework/trunk/fuseboxApplication.cfc

    r292 r293  
    5757                <cfargument name="myFusebox" type="myFusebox" required="true"  
    5858                                        hint="I am the myFusebox data structure." /> 
    59                  
    60                 <!--- fixes ticket 169 ---> 
     59                <cfargument name="callerPath" type="string" required="true"  
     60                                        hint="I am FUSEBOX_CALLER_PATH." /> 
     61                 
     62                <!--- fixes ticket 54 ---> 
    6163                <cfset var myVersion = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#" /> 
    6264 
     
    7375                <cfset variables.coreRoot = replace(getDirectoryFromPath(getCurrentTemplatePath()),"\","/","all") /> 
    7476 
    75                 <cfset this.approotdirectory = normalizePartialPath(this.webrootdirectory & arguments.appPath) /> 
     77                <cfset this.approotdirectory = normalizePartialPath(arguments.callerPath) & normalizePartialPath(arguments.appPath) /> 
    7678                <!--- remove pairs of directory/../ to form canonical path: ---> 
    7779                <cfloop condition="find('/../',this.approotdirectory) gt 0"> 
  • framework/trunk/myFusebox.cfc

    r292 r293  
    1616<cfcomponent hint="I provide the per-request myFusebox data structure and some convenience methods."> 
    1717        <cfscript> 
    18         // fixes ticket 169 
     18        // fixes ticket 54 
    1919        this.version.runtime     = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#"; 
    2020