Fixes the version search numerical conversion - hopefully this makes the search actually work correctly
This commit is contained in:
@@ -92,8 +92,8 @@ namespace OurUmbraco.Project
|
||||
{
|
||||
var asLong =
|
||||
version.Major.ToString().PadLeft(3, '0')
|
||||
+ (version.Minor == -1 ? "0" : version.Minor.ToString()).PadRight(3, '0')
|
||||
+ (version.Build == -1 ? "0" : version.Build.ToString()).PadRight(3, '0');
|
||||
+ (version.Minor == -1 ? "0" : version.Minor.ToString()).PadLeft(3, '0')
|
||||
+ (version.Build == -1 ? "0" : version.Build.ToString()).PadLeft(3, '0');
|
||||
return long.Parse(asLong);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace OurUmbraco.Repository.Models
|
||||
Images = new List<PackageImage>();
|
||||
Compatibility = new List<PackageCompatibility>();
|
||||
ExternalSources = new List<ExternalSource>();
|
||||
StrictFileVersion = new List<PackageVersionSupport>();
|
||||
StrictFileVersions = new List<PackageVersionSupport>();
|
||||
}
|
||||
|
||||
public PackageDetails(Package package)
|
||||
@@ -38,7 +38,7 @@ namespace OurUmbraco.Repository.Models
|
||||
/// <summary>
|
||||
/// Lists all files that have strict versions
|
||||
/// </summary>
|
||||
public List<PackageVersionSupport> StrictFileVersion { get; set; }
|
||||
public List<PackageVersionSupport> StrictFileVersions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of all supported/targeted Umbraco versions for all files for this package
|
||||
|
||||
@@ -232,6 +232,7 @@ namespace OurUmbraco.Repository.Services
|
||||
{
|
||||
TargetedUmbracoVersions = GetAllFilePackageVersions(allPackageFiles).Select(x => x.ToString(3)).ToArray(),
|
||||
Compatibility = GetPackageCompatibility(content),
|
||||
StrictFileVersions = strictPackageFileVersions.ToList(),
|
||||
NetVersion = content.GetPropertyValue<string>("dotNetVersion"),
|
||||
LicenseName = content.GetPropertyValue<string>("licenseName"),
|
||||
LicenseUrl = content.GetPropertyValue<string>("licenseUrl"),
|
||||
|
||||
Reference in New Issue
Block a user