Fixes to recently committed work

This commit is contained in:
Rick Falkvinge
2015-01-31 01:26:01 +01:00
parent 7c74998964
commit 36c7739078
3 changed files with 19 additions and 4 deletions
@@ -61,8 +61,8 @@ namespace Swarmops.Logic.Communications.Transmission
input = input.Replace ("[HostName]", Dns.GetHostName());
input = input.Replace ("[DbVersion]", SwarmDb.DbVersionExpected.ToString(CultureInfo.InvariantCulture));
input = input.Replace ("[SwarmopsVersion]", Formatting.SwarmopsVersion);
input = input.Replace("[InstallationName]", SystemSettings.InstallationName);
input = input.Replace("[ExternalUrl]", SystemSettings.ExternalUrl);
input = input.Replace ("[InstallationName]", SystemSettings.InstallationName);
input = input.Replace ("[ExternalUrl]", SystemSettings.ExternalUrl);
// Loop through supplied strings and replace them in the resource. Not very efficient but who cares
+15 -1
View File
@@ -33,6 +33,8 @@ namespace Swarmops.Frontend.Pages.v5.Admin
SystemSettings.SmtpHost, SystemSettings.SmtpPort);
this.TextExternalUrl.Text = SystemSettings.ExternalUrl;
this.TextInstallationName.Text = SystemSettings.InstallationName;
this.TextAdminAddress.Text = SystemSettings.AdminNotificationAddress;
this.TextAdminSender.Text = SystemSettings.AdminNotificationSender;
Localize();
}
@@ -136,7 +138,19 @@ namespace Swarmops.Frontend.Pages.v5.Admin
case "InstallationName":
result.NewData = newValue.Trim();
result.ResultCode = AjaxTextBox.CodeSuccess;
SystemSettings.InstallationName = newValue;
SystemSettings.InstallationName = result.NewData;
break;
case "AdminSender":
result.NewData = newValue.Trim();
result.ResultCode = AjaxTextBox.CodeSuccess;
SystemSettings.InstallationName = result.NewData;
break;
case "AdminAddress":
result.NewData = newValue.Trim();
result.ResultCode = AjaxTextBox.CodeSuccess;
SystemSettings.AdminNotificationAddress = result.NewData;
break;
default:
@@ -31,7 +31,8 @@ namespace Swarmops.Utility.Communications
var methodInfo = payloadType.GetMethod("FromXml", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
// Set culture specific to the person being rendered for
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture (!string.IsNullOrEmpty (person.PreferredCulture) ? person.PreferredCulture : "en-US");
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture =
CultureInfo.CreateSpecificCulture (!string.IsNullOrEmpty (person.PreferredCulture) ? person.PreferredCulture : "en-US");
ICommsRenderer renderer = (ICommsRenderer)(methodInfo.Invoke(null, new object[] { envelope.PayloadXml }));
RenderedComm comm = renderer.RenderComm (person);