Changeset 262

Show
Ignore:
Timestamp:
11/04/06 18:49:20 (2 years ago)
Author:
scorfield
Message:

Fixes #158 by moving the attribute check for plugins inside the (existing) conditional that checked the declaration's xmlName.

Location:
framework/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/fuseboxApplication.cfc

    r261 r262  
    835835                                        hint="I am the parsed XML representation of the fusebox.xml file." /> 
    836836                 
     837                <!--- TODO: this xpath means that we can't spot bad phase declarations: ---> 
    837838                <cfset var children = xmlSearch(arguments.fbCode,"/fusebox/plugins/phase") /> 
    838839                <cfset var i = 0 /> 
  • framework/trunk/fuseboxPlugin.cfc

    r202 r262  
    6868                <cfset var ext = "." & arguments.fbApp.scriptFileDelimiter /> 
    6969                 
    70                 <cfif not structKeyExists(arguments.pluginXML.xmlAttributes,"name")> 
    71                         <cfthrow type="fusebox.badGrammar.requiredAttributeMissing" 
    72                                         message="Required attribute is missing" 
    73                                         detail="The attribute 'name' is required, for a '#arguments.phase#' plugin declaration in fusebox.xml." /> 
    74                 </cfif> 
     70                <cfif arguments.pluginXML.xmlName is "plugin"> 
    7571                 
    76                 <cfset variables.name = arguments.pluginXML.xmlAttributes.name /> 
    77                 <cfset variables.fuseboxApplication = arguments.fbApp /> 
     72                        <cfif not structKeyExists(arguments.pluginXML.xmlAttributes,"name")> 
     73                                <cfthrow type="fusebox.badGrammar.requiredAttributeMissing" 
     74                                                message="Required attribute is missing" 
     75                                                detail="The attribute 'name' is required, for a '#arguments.phase#' plugin declaration in fusebox.xml." /> 
     76                        </cfif> 
     77                         
     78                        <cfset variables.name = arguments.pluginXML.xmlAttributes.name /> 
     79                        <cfset variables.fuseboxApplication = arguments.fbApp /> 
     80         
     81                        <cfif not structKeyExists(arguments.pluginXML.xmlAttributes,"template")> 
     82                                <cfthrow type="fusebox.badGrammar.requiredAttributeMissing" 
     83                                                message="Required attribute is missing" 
     84                                                detail="The attribute 'template' is required, for the '#getName()#' plugin declaration in fusebox.xml." /> 
     85                        </cfif> 
     86         
     87                        <cfset variables.phase = arguments.phase /> 
    7888 
    79                 <cfif not structKeyExists(arguments.pluginXML.xmlAttributes,"template")> 
    80                         <cfthrow type="fusebox.badGrammar.requiredAttributeMissing" 
    81                                         message="Required attribute is missing" 
    82                                         detail="The attribute 'template' is required, for the '#getName()#' plugin declaration in fusebox.xml." /> 
    83                 </cfif> 
     89                        <cfset this.path = arguments.fbApp.getPluginsPath() /> 
    8490 
    85                 <cfset variables.phase = arguments.phase /> 
    86                 <cfif arguments.pluginXML.xmlName is "plugin"> 
    87                         <cfset this.path = arguments.fbApp.getPluginsPath() /> 
    8891                        <cfif structKeyExists(arguments.pluginXML.xmlAttributes,"path")> 
    8992                                <cfset this.path = this.path & replace(arguments.pluginXML.xmlAttributes.path,"\","/","all") /> 
  • framework/trunk/myFusebox.cfc

    r261 r262  
    5151<cfcomponent hint="I provide the per-request myFusebox data structure and some convenience methods."> 
    5252        <cfscript> 
    53         this.version.runtime     = "unknown"; 
     53        this.version.runtime     = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#"; 
     54           
    5455        this.version.loader      = "unknown"; 
    5556        this.version.transformer = "unknown"; 
    5657        this.version.parser      = "unknown"; 
    57            
    58         this.version.runtime     = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#"; 
    5958           
    6059        this.thisCircuit = "";