Changeset 1500
- Timestamp:
- 05/05/08 23:18:59 (5 years ago)
- Location:
- coldbox/trunk
- Files:
-
- 1 added
- 5 modified
-
src/system/controller.cfc (modified) (2 diffs)
-
src/system/plugins/XMLParser.cfc (modified) (1 diff)
-
src/system/plugins/ioc.cfc (modified) (2 diffs)
-
src/system/plugins/logger.cfc (modified) (2 diffs)
-
testing/testmodel/security.cfc (modified) (1 diff)
-
testing/tests/cases/plugins/iocTest.cfc (added)
Legend:
- Unmodified
- Added
- Removed
-
coldbox/trunk/src/system/controller.cfc
r1494 r1500 31 31 //Set the Application hash on creation 32 32 setAppHash( hash(arguments.AppRootPath) ); 33 //App Root 33 34 setAppRootPath(arguments.AppRootPath); 34 35 … … 57 58 58 59 <!--- AppRootPath ---> 59 <cffunction name="getAppRootPath" access="public" returntype="string" output="false" >60 <cffunction name="getAppRootPath" access="public" returntype="string" output="false" hint="Get this application's physical path"> 60 61 <cfreturn instance.AppRootPath> 61 62 </cffunction> 62 <cffunction name="setAppRootPath" access="public" returntype="void" output="false" >63 <cffunction name="setAppRootPath" access="public" returntype="void" output="false" hint="Set this application's physical path."> 63 64 <cfargument name="AppRootPath" type="string" required="true"> 64 65 <cfset instance.AppRootPath = arguments.AppRootPath> -
coldbox/trunk/src/system/plugins/XMLParser.cfc
r1475 r1500 183 183 //Schema Path 184 184 StructInsert(settingsStruct, "ConfigFileSchemaLocation", instance.FrameworkConfigXSDFile); 185 //Application Path 185 //Fix Application Path to last / standard. 186 if( right(controller.getAppRootPath(),1) neq instance.FileSeparator){ 187 controller.setAppRootPath( controller.getAppRootPath() & instance.FileSeparator ); 188 } 189 //Now set the correct path. 186 190 StructInsert(settingsStruct, "ApplicationPath", controller.getAppRootPath() ); 191 187 192 //Load Framework Path too 188 193 StructInsert(settingsStruct, "FrameworkPath", ExpandPath("/coldbox/system") & instance.FileSeparator ); -
coldbox/trunk/src/system/plugins/ioc.cfc
r1471 r1500 113 113 <cfset var beanKey = "ioc_" & arguments.beanName> 114 114 <cfset var MetaData = structNew()> 115 <cfset var objTimeout = "">116 115 <cfset var objCaching = getSetting("IOCObjectCaching")> 117 116 … … 130 129 <!--- If Caching on, then set object in cache ---> 131 130 <cfif objCaching> 132 <cflock name="ioc.objectCaching.#arguments.beanName#" type="exclusive" timeout="30" throwontimeout="true"> 133 <!--- Get Object's MetaData, For Caching ---> 134 <cfset MetaData = getMetaData(oBean)> 135 <!--- By Default, services with no cache flag are set to false ---> 136 <cfif not structKeyExists(MetaData,"cache") or not isBoolean(MetaData.cache)> 137 <cfset MetaData.cache = false> 131 132 <!--- Get Object's MetaData, For Caching ---> 133 <cfset MetaData = getMetaData(oBean)> 134 <!--- By Default, services with no cache flag are set to false ---> 135 <cfif not structKeyExists(MetaData,"cache") or not isBoolean(MetaData.cache)> 136 <cfset MetaData.cache = false> 137 </cfif> 138 139 <!--- Test for caching parameters ---> 140 <cfif MetaData["cache"]> 141 <!--- Cache Metadata ---> 142 <cfif not structKeyExists(MetaData,"cachetimeout") or not isNumeric(metadata.cacheTimeout) > 143 <cfset MetaData.cacheTimeout = ""> 138 144 </cfif> 139 < !--- Test for caching parameters --->140 <cfif MetaData["cache"]>141 <cfif structKeyExists(MetaData,"cachetimeout")>142 <cfset objTimeout = MetaData["cachetimeout"]>143 </cfif>145 <cfif not structKeyExists(MetaData,"cacheLastAccessTimeout") or not isNumeric(metadata.cacheLastAccessTimeout) > 146 <cfset MetaData.cacheLastAccessTimeout = ""> 147 </cfif> 148 149 <cflock name="ioc.objectCaching.#arguments.beanName#" type="exclusive" timeout="30" throwontimeout="true"> 144 150 <!--- Cache the object ---> 145 <cfset getColdboxOCM().set(beanKey,oBean, objTimeout)>146 </cf if>147 </cf lock>151 <cfset getColdboxOCM().set(beanKey,oBean,metadata.cacheTimeout,metadata.cacheLastAccessTimeout)> 152 </cflock> 153 </cfif> 148 154 </cfif> 149 155 -
coldbox/trunk/src/system/plugins/logger.cfc
r1471 r1500 371 371 <cffunction name="setupLogLocationVariables" access="private" hint="Setup the log location variables." output="false" returntype="void"> 372 372 <!--- The Default Full log directory path ---> 373 <cfset var DefaultLogDirectory = getSetting("ApplicationPath",1) & getSetting(" OSFileSeparator",1) & getSetting("DefaultLogDirectory",1)>373 <cfset var DefaultLogDirectory = getSetting("ApplicationPath",1) & getSetting("DefaultLogDirectory",1)> 374 374 <!--- The absolute test Path ---> 375 375 <cfset var absTestPath = getPlugin("Utilities").getAbsolutePath(getSetting("ColdboxLogsLocation"))> 376 376 <!--- The local relative test path ---> 377 <cfset var TestPath = getSetting("ApplicationPath",1) & getSetting(" OSFileSeparator",1) & getSetting("ColdboxLogsLocation")>377 <cfset var TestPath = getSetting("ApplicationPath",1) & getSetting("ColdboxLogsLocation")> 378 378 <!--- Test EstablishedLogLocationpath ---> 379 379 <cfset var EstablishedLogLocationpath = ""> … … 394 394 </cfif> 395 395 396 <!--- Fix Log Location for last /\---> 397 <cfif right(EstablishedLogLocationpath,1) neq getSetting("OSFileSeparator",1)> 398 <cfset EstablishedLogLocationpath = EstablishedLogLocationpath & getSetting("OSFileSeparator",1)> 399 </cfif> 400 396 401 <!--- Finalize the path ---> 397 <cfset EstablishedLogLocationpath = EstablishedLogLocationpath & get Setting("OSFileSeparator",1) & getLogFileName() & ".log">402 <cfset EstablishedLogLocationpath = EstablishedLogLocationpath & getLogFileName() & ".log"> 398 403 399 404 <!--- Then set the complete log path and save. ---> -
coldbox/trunk/testing/testmodel/security.cfc
r1396 r1500 1 <cfcomponent output="false" >1 <cfcomponent output="false" cache="true" cachetimeout="5" cacheLastAccessTimeout="1"> 2 2 3 3 <cffunction name="init" access="public" returntype="security" hint="" output="false" >
