Update: Plugin Updating
Updating plugins from the plugin catalogue, and automatic updating of plugins after a newer version of Disco is installed.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Data.Configuration
|
||||
{
|
||||
public static class CommunityHelpers
|
||||
{
|
||||
public static string CommunityUrl()
|
||||
{
|
||||
// Special case for DiscoCommunity Hosting Network
|
||||
try
|
||||
{
|
||||
var ip = (from addr in Dns.GetHostEntry(Dns.GetHostName()).AddressList
|
||||
where addr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork
|
||||
&& addr.ToString().StartsWith("10.131.200.")
|
||||
select addr).FirstOrDefault();
|
||||
if (ip != null)
|
||||
{
|
||||
return "http://hades3:9393/base/";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{ } // Ignore Errors
|
||||
|
||||
return "http://discoict.com.au/base/";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -460,15 +460,19 @@ namespace Disco.Data.Configuration
|
||||
return this.GetConfigurationValue<bool>(this.Scope, "UpdateBetaDeployment", false);
|
||||
}
|
||||
}
|
||||
public string InstalledDatabaseVersion
|
||||
public Version InstalledDatabaseVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", null);
|
||||
var versionString = this.GetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", null);
|
||||
if (string.IsNullOrEmpty(versionString))
|
||||
return null;
|
||||
else
|
||||
return Version.Parse(versionString);
|
||||
}
|
||||
set
|
||||
{
|
||||
this.SetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", value);
|
||||
this.SetConfigurationValue<string>(this.Scope, "InstalledDatabaseVersion", value.ToString(4));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user