This commit is contained in:
2021-06-25 11:20:18 +01:00
parent e40ff8a7f2
commit 03873bbdf4
126 changed files with 3836 additions and 175 deletions
+5 -2
View File
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
//-------------------------------------------------------------------
public static class Version
{
private static String version { get; } = "1.0.9.0";
private static String version { get; } = "1.1.0.0";
// Retrieve version.
public static String GetFullVersion () { return version; }
public static String GetAppVersion ()
@@ -40,7 +40,10 @@ namespace Saxonite.Net.Standard.Base.App
//-------------------------------------------------------------------
// Version history.
//-------------------------------------------------------------------
// 1.0.9 ?-Jun-2021 Journalist Articles
// 1.1.0 25-Jun-2021 Article publication. Admin Regions.
// - Online Articles publication date and paging.
// - Admin Region paging and parent selection.
// 1.0.9 22-Jun-2021 Journalist Articles
// - Online Article Images.
// 1.0.8 15-Jun-2021 Online Article Content
// - Journalist Articles styled content.
+6 -3
View File
@@ -157,16 +157,19 @@ namespace Saxonite.Net.Standard.Base.App
{
Unknown = 0,
/* Do not change the numeric values - tied to database. */
Universe = 1,
Galaxy = 2,
World = 5,
Continent = 10,
SubContinent = 20,
/// <summary>Country - self-governing political entity, eg. Country, State (not US state)</summary>
Country = 30,
/// <summary>Nation, eg. Home Nation.</summary>
Nation = 40,
Nation = 70,
/// <summary>STate - major subdivision of country, eg. US state.</summary>
State = 50,
State = 80,
/// <summary>Province - eg. GB County.</summary>
Province = 60
Province = 90
}
//-------------------------------------------------------------------
@@ -74,9 +74,14 @@ namespace Saxonite.Net.Standard.Base.App
//---------------------------------------------------------------
// Region types.
regionTypeCodes.Add(Sax.RegionType.Universe, "UNIV", "Universe");
regionTypeCodes.Add(Sax.RegionType.Galaxy, "GALAX", "Galaxy");
regionTypeCodes.Add(Sax.RegionType.World, "WORLD", "World");
regionTypeCodes.Add(Sax.RegionType.Continent, "CONT", "Continent");
regionTypeCodes.Add(Sax.RegionType.SubContinent, "SUBC", "SubContinent");
regionTypeCodes.Add(Sax.RegionType.SubContinent, "SUBC", "Sub-Continent");
regionTypeCodes.Add(Sax.RegionType.Country, "COUN", "Country");
regionTypeCodes.Add(Sax.RegionType.State, "STAT", "State");
regionTypeCodes.Add(Sax.RegionType.Province, "PROV", "Province");
//---------------------------------------------------------------
// User roles.
@@ -166,7 +166,11 @@ namespace Saxonite.Net.Standard.Base.Bus
List<Sax.RegionType> parentRegionTypes = new List<Sax.RegionType>();
switch (regionType)
{
case Sax.RegionType.World:
parentRegionTypes.Add(Sax.RegionType.Galaxy);
break;
case Sax.RegionType.Continent:
parentRegionTypes.Add(Sax.RegionType.World);
break;
case Sax.RegionType.SubContinent:
parentRegionTypes.Add(Sax.RegionType.Continent);
@@ -175,6 +179,16 @@ namespace Saxonite.Net.Standard.Base.Bus
parentRegionTypes.Add(Sax.RegionType.Continent);
parentRegionTypes.Add(Sax.RegionType.SubContinent);
break;
case Sax.RegionType.Nation:
parentRegionTypes.Add(Sax.RegionType.Country);
break;
case Sax.RegionType.State:
parentRegionTypes.Add(Sax.RegionType.Country);
break;
case Sax.RegionType.Province:
parentRegionTypes.Add(Sax.RegionType.Country);
parentRegionTypes.Add(Sax.RegionType.Nation);
break;
}
return parentRegionTypes;
}
@@ -117,17 +117,27 @@ namespace Saxonite.Net.Standard.Base.Consoles
{
ClearErrorState();
// Determine whether article should be included in the Activity Index.
bool includeInActivityIndex = true;
// Only published articles have an activity index.
if (!DateUtil.IsValid(article.PublishedAt)) includeInActivityIndex = false;
// Only active articles have an activity index.
if (!article.IsStatusActive) ClearActivityIndex(article.GetItemId(), dbUpdateInfo);
if (!article.IsStatusActive) includeInActivityIndex = false;
// NB There will be other rules as well, eg. whether published.
// NB There will be other rules as well, eg. whether expired.
// Activity Index properties.
IndexData indexData = new IndexData(article.GetItemId());
indexData.SportIds.Add(article.SportIdPrimary);
indexData.RegionIds.Add(article.RegionIdPrimary);
indexData.EffectiveOn = DateUtil.OnInvalid(article.PublishedAt.Date, article.CreateStamp.On.Date);
return StoreActivityIndexData(indexData, dbUpdateInfo);
if (includeInActivityIndex)
{
// Activity Index properties.
IndexData indexData = new IndexData(article.GetItemId());
indexData.SportIds.Add(article.SportIdPrimary);
indexData.RegionIds.Add(article.RegionIdPrimary);
indexData.EffectiveOn = DateUtil.OnInvalid(article.PublishedAt.Date, article.CreateStamp.On.Date);
return StoreActivityIndexData(indexData, dbUpdateInfo);
}
return ClearActivityIndex(article.GetItemId(), dbUpdateInfo);
}
public bool ClearActivityIndex(SaxJournalistArticle article, DbUpdateInfo dbUpdateInfo)
{