Fix for Arabic calendar

This commit is contained in:
Falkvinge
2017-05-10 09:36:34 +02:00
parent a1c581e8a7
commit 3fbd723bb1
5 changed files with 22 additions and 2 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ namespace Swarmops.Backend
// Other one-time initializations
FinancialTransactions.FixAllUnsequenced();
SupportFunctions.OperatingTopology = OperatingTopology.Backend;
// Begin main loop
+3
View File
@@ -48,6 +48,9 @@ namespace Swarmops.Frontend.Socket
// Disable SSL cert checking (because Mono doesn't have a cert repo, dammit)
Swarmops.Logic.Support.SupportFunctions.DisableSslCertificateChecks();
// Other one-off initializations
SupportFunctions.OperatingTopology = OperatingTopology.FrontendSocket;
// Initiate main loop
UnixSignal[] killSignals = null;
+10
View File
@@ -102,5 +102,15 @@ namespace Swarmops.Logic.Support
{
SwarmDb.GetDatabaseForWriting().CreateExceptionLogEntry (DateTime.UtcNow, source, exception);
}
public static OperatingTopology OperatingTopology { get; set; }
}
public enum OperatingTopology
{
Unknown = 0,
Backend,
FrontendSocket,
FrontendWeb
}
}
+6
View File
@@ -71,6 +71,12 @@ namespace Swarmops.Frontend
{
CurrentAuthority = null; // unauthenticated!
}
// Regardless of auth data and culture, set Gregorian calendar
// (avoids problems with Arabic, etc, calendars and bookkeeping in localization)
GregorianCalendar normalizedCalendar = new GregorianCalendar();
normalizedCalendar.CalendarType = GregorianCalendarTypes.USEnglish;
}
+2 -1
View File
@@ -15,6 +15,7 @@
// Set supported cultures
HttpContext.Current.Application["Cultures"] = new[] {"sv-SE", "en-US", "en-GB", "de-DE", "de-AT", "fi-FI"};
HttpContext.Current.Application["UserRoleCache"] = new Dictionary<int, string[]>();
SupportFunctions.OperatingTopology = OperatingTopology.FrontendWeb;
}
private void Application_End(object sender, EventArgs e)
@@ -58,7 +59,7 @@
return; // prevent further matching
}
// Rewrite of general URLs
// Rewrite of general URLs, candidates in order, assuming host is "dev.swarmops.com" and {0} given path
string[] rewriteCandidates =
{