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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 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") />