Changeset 280
- Timestamp:
- 12/20/06 13:12:58 (2 years ago)
- Location:
- framework/trunk
- Files:
-
- 4 modified
-
.settings/org.eclipse.core.resources.prefs (modified) (1 diff)
-
fuseboxApplication.cfc (modified) (7 diffs)
-
fuseboxCircuit.cfc (modified) (4 diffs)
-
myFusebox.cfc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
framework/trunk/.settings/org.eclipse.core.resources.prefs
r205 r280 1 # Sun May 07 21:19:08 PDT 20061 #Wed Dec 20 12:07:13 PST 2006 2 2 eclipse.preferences.version=1 3 encoding//skeleton/controller/circuit.xml.cfm=UTF-84 3 encoding//skeleton/fusebox.xml.cfm=UTF-8 5 4 encoding//skeleton/model/circuit.xml.cfm=UTF-8 -
framework/trunk/fuseboxApplication.cfc
r279 r280 93 93 hint="I am the myFusebox data structure." /> 94 94 95 <!--- fix ticket 13 8--->95 <!--- fix ticket 135 ---> 96 96 <cfset var myVersion = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#" /> 97 97 … … 99 99 <cfset variables.fuseboxLexicon = variables.factory.getBuiltinLexicon() /> 100 100 <cfset variables.customAttributes = structNew() /> 101 102 <cfset variables.fuseboxFileExtension = "" /> 101 103 102 104 <cfset variables.fuseboxVersion = myVersion /> … … 153 155 154 156 <cfset var fbFile = "fusebox.xml.cfm" /> 157 <cfset var fbFileAlt = "fusebox.xml" /> 155 158 <cfset var fbXML = "" /> 156 159 <cfset var fbCode = "" /> … … 161 164 <cfset var jFuseboxFile = "" /> 162 165 <cfset var dtLastModified = "" /> 166 167 <!--- 168 since we need to check the file, regardless of whether we load it, 169 we might as well do the test up front and perform the strict check 170 that just one version exists (ticket 135) 171 ---> 172 <cfif fileExists(this.approotdirectory & fbFile)> 173 <cfif this.strictMode and fileExists(this.approotdirectory & fbFileAlt)> 174 <cfthrow type="fusebox.multipleFuseboxXML" 175 message="Both 'fusebox.xml' and 'fusebox.xml.cfm' exist" 176 detail="'fusebox.xml.cfm' will be used but 'fusebox.xml' also exists in '#this.approotdirectory#." /> 177 </cfif> 178 <cfelse> 179 <cfset fbFile = fbFileAlt /> 180 </cfif> 163 181 164 182 <cfif structKeyExists(this,"timestamp")> 165 <cfif not fileExists(this.approotdirectory & fbFile)>166 <cfset fbFile = "fusebox.xml" />167 </cfif>168 183 <!--- Java timestamp solution provided by Daniel Schmid ---> 169 184 <cfset myFuseboxFilePath = this.approotdirectory & fbFile /> … … 178 193 </cfif> 179 194 <!--- attempt to load fusebox.xml(.cfm): ---> 180 <cfif not fileExists(this.approotdirectory & fbFile)>181 <cfset fbFile = "fusebox.xml" />182 </cfif>183 195 <cftry> 184 196 … … 186 198 variable="fbXML" 187 199 charset="#this.characterEncoding#" /> 200 201 <cfset variables.fuseboxFileExtension = listLast(fbFile,".") /> 188 202 189 203 <cfcatch type="any"> … … 605 619 </cffunction> 606 620 621 <cffunction name="getFuseboxFileExtension" returntype="string" access="public" output="false" 622 hint="I return the fusebox.xml file extension: either xml or cfm."> 623 624 <cfreturn variables.fuseboxFileExtension /> 625 626 </cffunction> 627 607 628 <cffunction name="deleteParsedFiles" returntype="void" access="private" output="false" 608 629 hint="I delete all the script files in the parsed/ directory."> -
framework/trunk/fuseboxCircuit.cfc
r278 r280 130 130 131 131 <cfset var circuitFile = "circuit.xml.cfm" /> 132 <cfset var circuitFileAlt = "circuit.xml" /> 132 133 <cfset var circuitXML = "" /> 133 134 <cfset var circuitCode = "" /> … … 138 139 <cfset var dtLastModified = "" /> 139 140 141 <!--- 142 since we need to check the file, regardless of whether we load it, 143 we might as well do the test up front and perform the strict check 144 that just one version exists (ticket 135) 145 ---> 146 <cfif fileExists(variables.fullPath & circuitFile)> 147 <cfif variables.fuseboxApplication.strictMode and fileExists(variables.fullPath & circuitFileAlt)> 148 <cfthrow type="fusebox.multipleCircuitXML" 149 message="Both 'circuit.xml' and 'circuit.xml.cfm' exist" 150 detail="'circuit.xml.cfm' will be used but 'circuit.xml' also exists in '#variables.fullPath#." /> 151 </cfif> 152 <cfelse> 153 <cfset circuitFile = circuitFileAlt /> 154 </cfif> 155 140 156 <cfif structKeyExists(this,"timestamp")> 141 <cfif not fileExists(variables.fullPath & circuitFile)>142 <cfset circuitFile = "circuit.xml" />143 </cfif>144 157 <!--- Java timestamp solution provided by Daniel Schmid ---> 145 158 <cfset myCircuitFilePath = variables.fullPath & circuitFile /> … … 153 166 <cfset arguments.myFusebox.trace("Compiler","Loading #getAlias()# circuit.xml file") /> 154 167 </cfif> 168 155 169 <!--- attempt to load circuit.xml(.cfm): ---> 156 <cfif not fileExists(variables.fullPath & circuitFile)>157 <cfset circuitFile = "circuit.xml" />158 </cfif>159 170 <cftry> 160 171 … … 176 187 177 188 </cftry> 189 190 <cfif variables.fuseboxApplication.strictMode and 191 variables.fuseboxApplication.getFuseboxFileExtension() is not listLast(circuitFile,".")> 192 <cfthrow type="fusebox.inconsistentFuseboxCircuit" 193 message="Inconsistent Fusebox / Circuit file extensions" 194 detail="The circuit xml file, #circuitFile#, in #variables.fullPath#, uses a different file extension to the application's fusebox xml file. Strict requires consistency." /> 195 </cfif> 178 196 179 197 <cftry> -
framework/trunk/myFusebox.cfc
r279 r280 51 51 <cfcomponent hint="I provide the per-request myFusebox data structure and some convenience methods."> 52 52 <cfscript> 53 // fix ticket 13 853 // fix ticket 135 54 54 this.version.runtime = "5.0.1.#REReplace('$LastChangedRevision$','[^0-9]','','all')#"; 55 55
