mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 12:03:51 +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 {
|
public string SiteSalt {
|
||||||
get { return Record.SiteSalt; }
|
get { return Record.SiteSalt; }
|
||||||
}
|
}
|
||||||
public string SiteUrl {
|
|
||||||
get { return Record.SiteUrl; }
|
|
||||||
}
|
|
||||||
public string SuperUser {
|
public string SuperUser {
|
||||||
get { return Record.SuperUser; }
|
get { return Record.SuperUser; }
|
||||||
set { Record.SuperUser = value; }
|
set { Record.SuperUser = value; }
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace Orchard.Core.Settings.Models {
|
namespace Orchard.Core.Settings.Models {
|
||||||
public class SiteSettingsRecord : ContentPartRecord {
|
public class SiteSettingsRecord : ContentPartRecord {
|
||||||
public virtual string SiteSalt { get; set; }
|
public virtual string SiteSalt { get; set; }
|
||||||
public virtual string SiteUrl { get; set; }
|
|
||||||
public virtual string SiteName { get; set; }
|
public virtual string SiteName { get; set; }
|
||||||
public virtual string SuperUser { get; set; }
|
public virtual string SuperUser { get; set; }
|
||||||
public virtual string PageTitleSeparator { get; set; }
|
public virtual string PageTitleSeparator { get; set; }
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using Orchard.Data;
|
|||||||
using Orchard.Logging;
|
using Orchard.Logging;
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.Settings;
|
using Orchard.Settings;
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace Orchard.Core.Settings.Services {
|
namespace Orchard.Core.Settings.Services {
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
@@ -23,12 +22,10 @@ namespace Orchard.Core.Settings.Services {
|
|||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
|
|
||||||
public ISite GetSiteSettings() {
|
public ISite GetSiteSettings() {
|
||||||
string applicationPath = HttpContext.Current.Request.ApplicationPath;
|
SiteSettingsRecord record = _siteSettingsRepository.Table.FirstOrDefault();
|
||||||
SiteSettingsRecord record = _siteSettingsRepository.Fetch(x => x.SiteUrl == applicationPath).FirstOrDefault();
|
|
||||||
if (record == null) {
|
if (record == null) {
|
||||||
ISite site = _contentManager.Create<SiteSettings>("site", item => {
|
ISite site = _contentManager.Create<SiteSettings>("site", item => {
|
||||||
item.Record.SiteSalt = Guid.NewGuid().ToString("N");
|
item.Record.SiteSalt = Guid.NewGuid().ToString("N");
|
||||||
item.Record.SiteUrl = applicationPath;
|
|
||||||
item.Record.SiteName = "My Orchard Project Application";
|
item.Record.SiteName = "My Orchard Project Application";
|
||||||
item.Record.PageTitleSeparator = " - ";
|
item.Record.PageTitleSeparator = " - ";
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user