Skip to content

Commit

Permalink
cleaned up app.cfc
Browse files Browse the repository at this point in the history
  • Loading branch information
grantshepert committed Jan 16, 2014
1 parent 7e92901 commit 99b57f8
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Application.cfc
Expand Up @@ -56,8 +56,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

<cffunction name="setupApplication" output="false">
<cfset var beanFactory = "" />
<cfset var coldspringXml = "" />
<cfset var coldspringXmlPath = "" />
<cfset var defaultProperties = StructNew()>

<!--- ensure that we have PluginConfig in the variables scope and $ --->
Expand All @@ -74,15 +72,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<cfset $ = getMuraScope() />
</cfif>

<cfset coldspringXmlPath = "#expandPath('/plugins')#/#variables.pluginConfig.getDirectory()#/coldspring/coldspring.xml.cfm" />

<!--- read in coldspringXml --->
<cffile action="read" file="#coldspringXmlPath#" variable="coldspringXml" />

<!--- parse the coldspringXml and replace all [plugin] with the plugin mapping path, and |plugin| with the physical path --->
<cfset coldspringXml = replaceNoCase( coldspringXml, "[plugin]", "plugins.#variables.pluginConfig.getDirectory()#.", "ALL") />
<cfset coldspringXml = replaceNoCase( coldspringXml, "|plugin|", "plugins/#variables.pluginConfig.getDirectory()#/", "ALL") />

<!--- set the default values --->
<cfset defaultProperties.dsn = $.globalConfig().getValue( "datasource" )>
<cfset defaultProperties.dsnusername = $.globalConfig().getValue( "dbusername" )>
Expand Down Expand Up @@ -115,7 +104,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

<cfset variables.pluginConfig.getApplication().setValue( "beanFactory", beanFactory ) />

<!--- set the FW/1 bean factory as our new ColdSpring bean factory --->
<!--- set the FW/1 bean factory --->
<cfset setBeanFactory( beanFactory ) />

<cfif variables.framework.reloadApplicationOnEveryRequest or StructKeyExists(url,variables.framework.reload)>
Expand Down

0 comments on commit 99b57f8

Please sign in to comment.