Skip to content

Commit

Permalink
netfx
Browse files Browse the repository at this point in the history
  • Loading branch information
starlying committed Jun 6, 2019
1 parent f0cb1c0 commit 4d4acd5
Show file tree
Hide file tree
Showing 21 changed files with 174 additions and 174 deletions.
8 changes: 4 additions & 4 deletions SiteServer.CMS/Core/OnlineTemplateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ namespace SiteServer.CMS.Core
{
public static class OnlineTemplateManager
{
private const string UrlTemplatesXml = "http://templates.siteserver.cn/templates.xml";
private const string UrlTemplatesXml = "https://www.siteserver.cn/templates/templates.xml";

public const string UrlHome = "http://templates.siteserver.cn";
public const string UrlHome = "https://www.siteserver.cn/templates/";

public static bool TryGetOnlineTemplates(out List<Dictionary<string, string>> list)
{
Expand All @@ -34,7 +34,7 @@ public static bool TryGetOnlineTemplates(out List<Dictionary<string, string>> li

while (ie.MoveNext())
{
var childNode = (XmlNode) ie.Current;
var childNode = (XmlNode)ie.Current;
if (childNode == null) continue;

var nodeName = childNode.Name;
Expand Down Expand Up @@ -84,7 +84,7 @@ public static bool TryGetOnlineTemplates(out List<Dictionary<string, string>> li

public static string GetTemplateUrl(string name)
{
return $"http://templates.siteserver.cn/t-{name.ToLower()}/index.html";
return $"https://www.siteserver.cn/templates/t-{name.ToLower()}/index.html";
}

public static string GetDownloadUrl(string name)
Expand Down
4 changes: 2 additions & 2 deletions SiteServer.CMS/ImportExport/AtomUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static AtomFeed GetEmptyFeed()
{
Title = new AtomContentConstruct("title", "siteserver channel"),
Author = new AtomPersonConstruct("author",
"siteserver", new Uri("http://www.siteserver.cn")),
"siteserver", new Uri("https://www.siteserver.cn")),
Modified = new AtomDateConstruct("modified", DateTime.Now,
TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now))
};
Expand All @@ -88,7 +88,7 @@ public static AtomEntry GetEmptyEntry()
{
var entry = new AtomEntry
{
Id = new Uri("http://www.siteserver.cn/"),
Id = new Uri("https://www.siteserver.cn/"),
Title = new AtomContentConstruct("title", "title"),
Modified = new AtomDateConstruct("modified", DateTime.Now,
TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now)),
Expand Down
46 changes: 23 additions & 23 deletions SiteServer.CMS/StlParser/StlEntity/StlStlEntities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ namespace SiteServer.CMS.StlParser.StlEntity
{
[StlElement(Title = "通用实体", Description = "通过 {stl.} 实体在模板中显示对应数据")]
public class StlStlEntities
{
private StlStlEntities()
{
}
{
private StlStlEntities()
{
}

public const string EntityName = "stl";

Expand All @@ -22,30 +22,30 @@ private StlStlEntities()
public static string SiteId = "SiteId";
public static string SiteDir = "SiteDir";
public static string SiteUrl = "SiteUrl";
public static string RootUrl = "RootUrl";
public static string RootUrl = "RootUrl";
public static string ApiUrl = "ApiUrl";
public static string CurrentUrl = "CurrentUrl";
public static string ChannelUrl = "ChannelUrl";
public static string HomeUrl = "HomeUrl";
public static string HomeUrl = "HomeUrl";
public static string LoginUrl = "LoginUrl";
public static string RegisterUrl = "RegisterUrl";
public static string LogoutUrl = "LogoutUrl";
public static string RegisterUrl = "RegisterUrl";
public static string LogoutUrl = "LogoutUrl";

public static SortedList<string, string> AttributeList => new SortedList<string, string>
{
{PoweredBy, "PoweredBy 链接"},
{SiteName, "站点名称"},
{SiteId, "站点ID"},
{SiteDir, "站点文件夹"},
{SiteUrl, "站点根目录地址"},
{RootUrl, "系统根目录地址"},
{
{PoweredBy, "PoweredBy 链接"},
{SiteName, "站点名称"},
{SiteId, "站点ID"},
{SiteDir, "站点文件夹"},
{SiteUrl, "站点根目录地址"},
{RootUrl, "系统根目录地址"},
{ApiUrl, "Api地址"},
{CurrentUrl, "当前页地址"},
{ChannelUrl, "栏目页地址"},
{HomeUrl, "用户中心地址"},
{ChannelUrl, "栏目页地址"},
{HomeUrl, "用户中心地址"},
{LoginUrl, "用户中心登录页地址"},
{RegisterUrl, "用户中心注册页地址"},
{LogoutUrl, "退出登录页地址"}
{RegisterUrl, "用户中心注册页地址"},
{LogoutUrl, "退出登录页地址"}
};

internal static string Parse(string stlEntity, PageInfo pageInfo, ContextInfo contextInfo)
Expand All @@ -58,7 +58,7 @@ internal static string Parse(string stlEntity, PageInfo pageInfo, ContextInfo co

if (StringUtils.EqualsIgnoreCase(PoweredBy, attributeName))//支持信息
{
parsedContent = @"Powered by <a href=""http://www.siteserver.cn"" target=""_blank"">SiteServer CMS</a>";
parsedContent = @"Powered by <a href=""https://www.siteserver.cn"" target=""_blank"">SiteServer CMS</a>";
}
else if (StringUtils.EqualsIgnoreCase(RootUrl, attributeName))//系统根目录地址
{
Expand Down Expand Up @@ -135,11 +135,11 @@ internal static string Parse(string stlEntity, PageInfo pageInfo, ContextInfo co
if (pageInfo.SiteInfo.Additional.ContainsKey(attributeName))
{
parsedContent = pageInfo.SiteInfo.Additional.GetString(attributeName);

if (!string.IsNullOrEmpty(parsedContent))
{
var styleInfo = TableStyleManager.GetTableStyleInfo(DataProvider.SiteDao.TableName, attributeName, TableStyleManager.GetRelatedIdentities(pageInfo.SiteId));

// 如果 styleInfo.TableStyleId <= 0,表示此字段已经被删除了,不需要再显示值了 ekun008
if (styleInfo.Id > 0)
{
Expand All @@ -166,5 +166,5 @@ internal static string Parse(string stlEntity, PageInfo pageInfo, ContextInfo co

return parsedContent;
}
}
}
}
244 changes: 122 additions & 122 deletions SiteServer.Utils/ThirdParty/Atom/Atom.Utils/DefaultValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,126 +37,126 @@ POSSIBILITY OF SUCH DAMAGE.

namespace Atom.Utils
{
/// <summary>
/// Contains default values for Atom feeds.
/// </summary>
[Serializable]
public sealed class DefaultValues
{
private DefaultValues() {}
internal const string GeneratorName = "Atom.NET";
internal static readonly Uri GeneratorUri = new Uri("http://www.siteserver.cn");
internal const string GeneratorMessage = "Generated by SiteServer CMS";
internal static readonly string GeneratorVersion = Utils.GetVersion();
internal const string AtomVersion = "0.3";
internal const string AtomNSPrefix = "atom";
internal static readonly Uri AtomNSUri = new Uri("http://purl.org/atom/ns#");

internal const string DCNSPrefix = "dc";
internal static readonly Uri DCNSUri = new Uri("http://purl.org/dc/elements/1.1/");

/// <summary>
/// The media type of Atom xml format.
/// </summary>
public static readonly MediaType AtomMediaType = MediaType.ApplicationAtomXml;

/// <summary>
/// The default language of the feed.
/// </summary>
public static readonly Language Language = Language.UnknownLanguage;

/// <summary>
/// The default value for int values.
/// </summary>
public const int Int = -1;

/// <summary>
/// The default media type.
/// It defaults to "text/plain".
/// </summary>
public static readonly MediaType MediaType = MediaType.TextPlain;

/// <summary>
/// The default encoding mode for the contents.
///
/// <list type="bullet">
/// <item>
/// <term>xml</term>
/// <description>The content is inline xml.</description>
/// </item>
/// <item>
/// <term>escaped</term>
/// <description>The content is an escaped string.</description>
/// </item>
/// <item>
/// <term>base64</term>
/// <description>The content is base64 encoded.</description>
/// </item>
/// </list>
///
/// Processors must decode the element's content before considering it as content of the the indicated media type.
/// It defaults to "xml".
/// </summary>
public static readonly Mode Mode = Mode.Xml;

/// <summary>
/// The default relationship for the links.
///
/// <list type="bullet">
/// <item>
/// <term>alternate</term>
/// <description>The URI in the href attribute points to an alternate representation of the containing resource.</description>
/// </item>
/// <item>
/// <term>start</term>
/// <description>The Atom feed at the URI supplied in the href attribute contains the first feed in a linear sequence of entries.</description>
/// </item>
/// <item>
/// <term>next</term>
/// <description>The Atom feed at the URI supplied in the href attribute contains the next N entries in a linear sequence of entries.</description>
/// </item>
/// <item>
/// <term>prev</term>
/// <description> The Atom feed at the URI supplied in the href attribute contains the previous N entries in a linear sequence of entries.</description>
/// </item>
/// <item>
/// <term>service.edit</term>
/// <description>The URI given in the href attribute is used to edit a representation of the referred resource.</description>
/// </item>
/// <item>
/// <term>service.post</term>
/// <description>The URI in the href attribute is used to create new resources.</description>
/// </item>
/// <item>
/// <term>service.feed</term>
/// <description>The URI given in the href attribute is a starting point for navigating content and services.</description>
/// </item>
/// </list>
///
/// It defaults to "alternate".
/// </summary>
public const Relationship Rel = Relationship.Alternate;

/// <summary>
/// The default uri for Uri fields.
/// </summary>
public static readonly Uri Uri = new Uri("http://www.intertwingly.net/wiki/pie/FrontPage");

/// <summary>
/// The default date/time.
/// </summary>
public static readonly DateTime DateTime = DateTime.MinValue;

/// <summary>
/// The default UTC offset.
/// </summary>
public static readonly TimeSpan UtcOffset = TimeSpan.MinValue;

/// <summary>
/// The default encoding.
/// </summary>
public static readonly Encoding Encoding = Encoding.UTF8;
}
/// <summary>
/// Contains default values for Atom feeds.
/// </summary>
[Serializable]
public sealed class DefaultValues
{
private DefaultValues() { }

internal const string GeneratorName = "Atom.NET";
internal static readonly Uri GeneratorUri = new Uri("https://www.siteserver.cn");
internal const string GeneratorMessage = "Generated by SiteServer CMS";
internal static readonly string GeneratorVersion = Utils.GetVersion();

internal const string AtomVersion = "0.3";
internal const string AtomNSPrefix = "atom";
internal static readonly Uri AtomNSUri = new Uri("http://purl.org/atom/ns#");

internal const string DCNSPrefix = "dc";
internal static readonly Uri DCNSUri = new Uri("http://purl.org/dc/elements/1.1/");

/// <summary>
/// The media type of Atom xml format.
/// </summary>
public static readonly MediaType AtomMediaType = MediaType.ApplicationAtomXml;

/// <summary>
/// The default language of the feed.
/// </summary>
public static readonly Language Language = Language.UnknownLanguage;

/// <summary>
/// The default value for int values.
/// </summary>
public const int Int = -1;

/// <summary>
/// The default media type.
/// It defaults to "text/plain".
/// </summary>
public static readonly MediaType MediaType = MediaType.TextPlain;

/// <summary>
/// The default encoding mode for the contents.
///
/// <list type="bullet">
/// <item>
/// <term>xml</term>
/// <description>The content is inline xml.</description>
/// </item>
/// <item>
/// <term>escaped</term>
/// <description>The content is an escaped string.</description>
/// </item>
/// <item>
/// <term>base64</term>
/// <description>The content is base64 encoded.</description>
/// </item>
/// </list>
///
/// Processors must decode the element's content before considering it as content of the the indicated media type.
/// It defaults to "xml".
/// </summary>
public static readonly Mode Mode = Mode.Xml;

/// <summary>
/// The default relationship for the links.
///
/// <list type="bullet">
/// <item>
/// <term>alternate</term>
/// <description>The URI in the href attribute points to an alternate representation of the containing resource.</description>
/// </item>
/// <item>
/// <term>start</term>
/// <description>The Atom feed at the URI supplied in the href attribute contains the first feed in a linear sequence of entries.</description>
/// </item>
/// <item>
/// <term>next</term>
/// <description>The Atom feed at the URI supplied in the href attribute contains the next N entries in a linear sequence of entries.</description>
/// </item>
/// <item>
/// <term>prev</term>
/// <description> The Atom feed at the URI supplied in the href attribute contains the previous N entries in a linear sequence of entries.</description>
/// </item>
/// <item>
/// <term>service.edit</term>
/// <description>The URI given in the href attribute is used to edit a representation of the referred resource.</description>
/// </item>
/// <item>
/// <term>service.post</term>
/// <description>The URI in the href attribute is used to create new resources.</description>
/// </item>
/// <item>
/// <term>service.feed</term>
/// <description>The URI given in the href attribute is a starting point for navigating content and services.</description>
/// </item>
/// </list>
///
/// It defaults to "alternate".
/// </summary>
public const Relationship Rel = Relationship.Alternate;

/// <summary>
/// The default uri for Uri fields.
/// </summary>
public static readonly Uri Uri = new Uri("http://www.intertwingly.net/wiki/pie/FrontPage");

/// <summary>
/// The default date/time.
/// </summary>
public static readonly DateTime DateTime = DateTime.MinValue;

/// <summary>
/// The default UTC offset.
/// </summary>
public static readonly TimeSpan UtcOffset = TimeSpan.MinValue;

/// <summary>
/// The default encoding.
/// </summary>
public static readonly Encoding Encoding = Encoding.UTF8;
}
}
1 change: 1 addition & 0 deletions SiteServer.Web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Template
/Mullen/
/Matthew/
Web.config
.vscode/

test/
## sqlserver
Expand Down
Loading

0 comments on commit 4d4acd5

Please sign in to comment.