mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Remove SiteUrl from SiteSettings
This is used used and not needed with the multi-tenancy work recently done. --HG-- branch : dev
This commit is contained in:
@@ -16,9 +16,6 @@ namespace Orchard.Core.Settings.Models {
|
||||
public string SiteSalt {
|
||||
get { return Record.SiteSalt; }
|
||||
}
|
||||
public string SiteUrl {
|
||||
get { return Record.SiteUrl; }
|
||||
}
|
||||
public string SuperUser {
|
||||
get { return Record.SuperUser; }
|
||||
set { Record.SuperUser = value; }
|
||||
|
@@ -3,7 +3,6 @@
|
||||
namespace Orchard.Core.Settings.Models {
|
||||
public class SiteSettingsRecord : ContentPartRecord {
|
||||
public virtual string SiteSalt { get; set; }
|
||||
public virtual string SiteUrl { get; set; }
|
||||
public virtual string SiteName { get; set; }
|
||||
public virtual string SuperUser { get; set; }
|
||||
public virtual string PageTitleSeparator { get; set; }
|
||||
|
@@ -6,7 +6,6 @@ using Orchard.Data;
|
||||
using Orchard.Logging;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Settings;
|
||||
using System.Web;
|
||||
|
||||
namespace Orchard.Core.Settings.Services {
|
||||
[UsedImplicitly]
|
||||
@@ -23,12 +22,10 @@ namespace Orchard.Core.Settings.Services {
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public ISite GetSiteSettings() {
|
||||
string applicationPath = HttpContext.Current.Request.ApplicationPath;
|
||||
SiteSettingsRecord record = _siteSettingsRepository.Fetch(x => x.SiteUrl == applicationPath).FirstOrDefault();
|
||||
SiteSettingsRecord record = _siteSettingsRepository.Table.FirstOrDefault();
|
||||
if (record == null) {
|
||||
ISite site = _contentManager.Create<SiteSettings>("site", item => {
|
||||
item.Record.SiteSalt = Guid.NewGuid().ToString("N");
|
||||
item.Record.SiteUrl = applicationPath;
|
||||
item.Record.SiteName = "My Orchard Project Application";
|
||||
item.Record.PageTitleSeparator = " - ";
|
||||
});
|
||||
|
Reference in New Issue
Block a user