isColdFusionVersionAtleast(MinimumVersionNumber)
Last updated April 14, 2011
Version: 1 | Requires: ColdFusion 9 | Library: CFMLLib
Description:
Accepts a comma delimited version number and checks it against the current Server.ColdFusion.ProductVersion value. It returns true if the current product version is at least the given value, and false if not.
Return Values:
Returns a boolean.
Example:
This application requires atleast ColdFusion version 9.0.1. Please update your server.
<cfabort />
</cfif>
Parameters:
| Name | Description | Required |
|---|---|---|
| MinimumVersionNumber | Minimum ColdFusion version | Yes |
Full UDF Source:
<!---
Checks the server's ColdFusion product version
@param MinimumVersionNumber Minimum ColdFusion version (Required)
@return Returns a boolean.
@author Jon Hartmann (jon.hartmann@gmail.com)
@version 1, April 14, 2011
--->
<cffunction name="isColdFusionVersionAtleast" access="private" output="false" returntype="boolean">
<cfargument name="MinimumVersionNumber" type="string" required="true" />
<cfset Local.VersionData = ListToArray(Server.ColdFusion.ProductVersion) />
<cfset Local.TestVersionData = ListToArray(Arguments.MinimumVersionNumber) />
<cfset Local.Result = true />
<cfset local.x = "">
<cfloop from="1" to="#Min(ArrayLen(Local.TestVersionData), ArrayLen(Local.VersionData))#" index="x">
<cfif Local.VersionData[x] lt Local.TestVersionData[x]>
<cfset Local.Result = false />
<cfbreak />
<cfelseif Local.VersionData[x] gt Local.TestVersionData[x]>
<cfbreak />
</cfif>
</cfloop>
<cfreturn Local.Result />
</cffunction>
Search CFLib.org
Latest Additions
Dave Anderson added
iniToStruct
20 day(s) ago
Dave Anderson added
deDupeArray
20 day(s) ago
Richard added
dice
22 day(s) ago
Isaac Dealey added
getRelative
a while ago
Top Rated
backupDatabase
Rated 5.0, 22 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)
highlightAndCrop
Rated 5.0, 4 time(s)