Skip to content

Commit

Permalink
LDEV-4644 bugfix for when no update is available
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jul 21, 2023
1 parent 3f8bed3 commit 16fc49e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
33 changes: 18 additions & 15 deletions core/src/main/cfml/context/admin/update.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@
<!--- Core --->
<cfif adminType == "server">
<cfset filterMajor = true>
<cfset hasUpdate = false>

<cfset curr=server.lucee.version>
<cfset curr=listFirst(server.lucee.version,".")>

<cfset updateInfo=getAvailableVersion()>
<cfif server.lucee.state EQ "RC">
<cfif not structKeyExists(updateInfo, "available")>
<!--- no update available --->
<cfelseif server.lucee.state EQ "RC">
<cfset get_rc = []>
<cfloop index="rcList" array="#updateInfo.otherVersions#">
<cfif listContainsNoCase(rcList,"-RC") EQ 1>
Expand Down Expand Up @@ -79,20 +82,20 @@
<cfif len(available) eq 0 or server.lucee.version eq available>
<cfset hasUpdate = false>
<cfelse>
<cfset cur_ver = listfirst(curr,"-")>
<cfloop from="1" to="#listlen(cur_ver,".")#" index="i">
<cfif len(listgetat(ava_ver,i,".")) eq 1>
<cfset last = 0&listgetat(ava_ver,i,".")>
<cfset ava_ver = listsetat(ava_ver,i,last,".")>
</cfif>
<cfif len(listgetat(cur_ver,i,".")) eq 1>
<cfset last = 0&listgetat(cur_ver,i,".")>
<cfset cur_ver = listsetat(cur_ver,i,last,".")>
</cfif>
</cfloop>
<cfset ava_ver = ava_ver&"-"&listlast(available,"-")>
<cfset cur_ver = cur_ver&"-"&listlast(curr,"-")>
<cfset hasUpdate = structKeyExists(updateInfo,"available") && ava_ver gt cur_ver>
<cfset cur_ver = listfirst(curr,"-")>
<cfloop from="1" to="#listlen(cur_ver,".")#" index="i">
<cfif len(listgetat(ava_ver,i,".")) eq 1>
<cfset last = 0&listgetat(ava_ver,i,".")>
<cfset ava_ver = listsetat(ava_ver,i,last,".")>
</cfif>
<cfif len(listgetat(cur_ver,i,".")) eq 1>
<cfset last = 0&listgetat(cur_ver,i,".")>
<cfset cur_ver = listsetat(cur_ver,i,last,".")>
</cfif>
</cfloop>
<cfset ava_ver = ava_ver&"-"&listlast(available,"-")>
<cfset cur_ver = cur_ver&"-"&listlast(curr,"-")>
<cfset hasUpdate = structKeyExists(updateInfo,"available") && ava_ver gt cur_ver>
</cfif>
</cfif>
</cfif>
Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="5.3.11.3-RC"/>
<property name="version" value="5.3.11.4-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>5.3.11.3-RC</version>
<version>5.3.11.4-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit 16fc49e

Please sign in to comment.