Skip to content

Commit

Permalink
Address issues with incorrect results coming back from extension list…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
DominicWatson committed Jun 20, 2024
1 parent 58f5851 commit c53febe
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/updateserver/services/ExtensionMetadataReader.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ component accessors=true {
}
}

if ( lexFiles.recordcount > 100 ) { // protext from disaster of accidentally not fetching the lex files
if ( QueryRecordCount( lexFiles ) > 100 ) { // protext from disaster of accidentally not fetching the lex files
metaChanged = _removeRedundantExtensions( meta, lexFiles ) || metaChanged;
}

Expand Down Expand Up @@ -55,15 +55,15 @@ component accessors=true {

var extensions = Duplicate( getExtensionMeta() );

if ( !arguments.all ) {
extensions = _stripAllButLatestVersions( extensions );
}
if ( arguments.type != "all" ) {
_filterExtensionTypes( extensions, arguments.type );
}
if ( !arguments.withLogo ) {
_stripExtensionLogos( extensions );
}
if ( !arguments.all ) {
extensions = _stripAllButLatestVersions( extensions );
}

variables._simpleCache[ cacheKey ] = extensions;
}
Expand Down Expand Up @@ -296,7 +296,7 @@ component accessors=true {
}

private function _filterExtensionTypes( extensions, type ) {
for( var i=arguments.extensions.recordcount; i>=1; i-- ) {
for( var i=QueryRecordCount( arguments.extensions ); i>=1; i-- ) {
switch( arguments.type ) {
case "snapshot":
if( !FindNoCase( '-SNAPSHOT', arguments.extensions.version[ i ] ) ) {
Expand Down Expand Up @@ -325,7 +325,7 @@ component accessors=true {
}

private function _stripExtensionLogos( extensions, type ) {
for ( var i=arguments.extensions.recordcount; i >= 1; i-- ) {
for ( var i=QueryRecordCount( arguments.extensions ); i >= 1; i-- ) {
arguments.extensions.image[ i ] = "";
}
}
Expand Down Expand Up @@ -374,7 +374,7 @@ component accessors=true {
private function _removeRedundantExtensions( cachedExts, lexFiles ) {
var changed = false;

for( var i=arguments.cachedExts.recordCount; i>0; i-- ){
for( var i=QueryRecordCount( arguments.cachedExts ); i>0; i-- ){
var found = false;
for( var f in lexFiles ) {
if ( f.name == arguments.cachedExts.filename[ i ] ) {
Expand Down

0 comments on commit c53febe

Please sign in to comment.