Browse Source

6.6

pull/1425/head siteserver-v6.6.0-beta
starlying 7 years ago
parent
commit
cf72464992
  1. 25
      README.md
  2. 2
      SS.CMS.nuspec
  3. 2
      SiteServer.BackgroundPages/Cms/PageContent.cs
  4. 2
      SiteServer.CMS/Model/Attributes/ChannelInfoExtend.cs
  5. 31
      SiteServer.CMS/Model/ChannelInfo.cs
  6. 4
      SiteServer.CMS/Provider/ContentDao.cs
  7. 6
      SiteServer.CMS/Provider/TagDao.cs
  8. 2
      SiteServer.CMS/StlParser/StlElement/StlChannel.cs
  9. 5
      SiteServer.CMS/StlParser/StlElement/StlChannels.cs
  10. 10
      SiteServer.Utils/StringUtils.cs
  11. 4
      appveyor.yml

25
README.md

@ -4,18 +4,21 @@ SiteServer CMS 基于.NET平台,能够以最低的成本、最少的人力投
![SiteServer CMS](https://www.siteserver.cn/assets/github-banner.png)
## 版本
项目发布的正式版本存放在 `master` 分支,当前的开发版本存放在 `dev` 分支
版本 | 编译状态 | 版本号 | 发布日期
------ | ------ | ------ | ------
正式版 | [![Build status](https://ci.appveyor.com/api/projects/status/plx37i94y9gsqkru/branch/master?svg=true)](https://ci.appveyor.com/project/starlying/cms/branch/master) | ![Nuget version](https://img.shields.io/nuget/v/SS.CMS.svg) | ![master last commit](https://img.shields.io/github/last-commit/siteserver/cms/master.svg)
开发版 | [![Build status](https://ci.appveyor.com/api/projects/status/plx37i94y9gsqkru/branch/dev?svg=true)](https://ci.appveyor.com/project/starlying/cms/branch/dev) | ![Myget version](https://img.shields.io/myget/siteserver/v/SS.CMS.svg) | ![dev last commit](https://img.shields.io/github/last-commit/siteserver/cms/dev.svg)
| 版本 | 编译状态 | 版本号 | 发布日期 |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| 正式版 | [![Build status](https://ci.appveyor.com/api/projects/status/plx37i94y9gsqkru/branch/master?svg=true)](https://ci.appveyor.com/project/starlying/cms/branch/master) | ![Nuget version](https://img.shields.io/nuget/v/SS.CMS.svg) | ![master last commit](https://img.shields.io/github/last-commit/siteserver/cms/master.svg) |
| 开发版 | [![Build status](https://ci.appveyor.com/api/projects/status/plx37i94y9gsqkru/branch/dev?svg=true)](https://ci.appveyor.com/project/starlying/cms/branch/dev) | ![Myget version](https://img.shields.io/myget/siteserver/v/SS.CMS.svg) | ![dev last commit](https://img.shields.io/github/last-commit/siteserver/cms/dev.svg) |
## 迭代计划
[2018年9月迭代计划](https://github.com/siteserver/cms/issues/1280)
[2018年8月迭代计划](https://github.com/siteserver/cms/issues/1138)
[2018年7月迭代计划](https://github.com/siteserver/cms/issues/956)
[2018年6月迭代计划](https://github.com/siteserver/cms/issues/719)
@ -32,15 +35,15 @@ SiteServer CMS 基于.NET平台,能够以最低的成本、最少的人力投
## 开发文档
[插件开发参考手册》](https://docs.siteserver.cn/plugins)
[STL 语言参考手册》](https://docs.siteserver.cn/stl/)
[STL 语言参考手册》](https://stl.siteserver.cn)
[插件开发参考手册》](https://docs.siteserver.cn/plugins/)
[《CLI 命令行参考手册》](https://docs.siteserver.cn/cli)
[《CLI 命令行参考手册》](https://docs.siteserver.cn/cli/)
[《REST API 参考手册》](https://docs.siteserver.cn/api)
[《REST API 参考手册》](https://docs.siteserver.cn/api/)
[《数据结构参考手册》](https://docs.siteserver.cn/model)
[《数据结构参考手册》](https://docs.siteserver.cn/model/)
系统使用文档请点击 [SiteServer CMS 文档中心](https://docs.siteserver.cn)
@ -93,7 +96,7 @@ SiteServer CMS 产品将在每个月底发布新的正式版本,我们将在
## 问题与建议
我们的目标是系统零BUG,如果发现任何BUG请提交至[Github Issues](https://github.com/siteserver/cms/issues)。
如果发现任何BUG以及对产品使用的问题与建议,请提交至 [Github Issues](https://github.com/siteserver/cms/issues)。
## 关注最新动态

2
SS.CMS.nuspec

@ -12,7 +12,7 @@
<copyright>Copyright © SiteServer CMS 2018</copyright>
<tags>SiteServer CMS</tags>
<releaseNotes>
SiteServer CMS V6.5正式版
SiteServer CMS V6.6正式版
</releaseNotes>
</metadata>
</package>

2
SiteServer.BackgroundPages/Cms/PageContent.cs

@ -63,7 +63,7 @@ namespace SiteServer.BackgroundPages.Cms
_pluginColumns = PluginContentManager.GetContentColumns(_channelInfo);
_isEdit = TextUtility.IsEdit(SiteInfo, channelId, AuthRequest.AdminPermissions);
if (_channelInfo.Additional.IsPreviewContents)
if (_channelInfo.Additional.IsPreviewContentsExists)
{
new Action(() =>
{

2
SiteServer.CMS/Model/Attributes/ChannelInfoExtend.cs

@ -80,7 +80,7 @@ namespace SiteServer.CMS.Model.Attributes
set => Set("TransDoneType", ETranslateContentTypeUtils.GetValue(value));
}
public bool IsPreviewContents
public bool IsPreviewContentsExists
{
get => GetBool("IsPreviewContents");
set => Set("IsPreviewContents", value);

31
SiteServer.CMS/Model/ChannelInfo.cs

@ -1,4 +1,8 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SiteServer.CMS.Core;
using SiteServer.CMS.Model.Attributes;
using SiteServer.CMS.Model.Enumerations;
using SiteServer.Plugin;
@ -160,8 +164,35 @@ namespace SiteServer.CMS.Model
}
private ChannelInfoExtend _additional;
[JsonIgnore]
public ChannelInfoExtend Additional => _additional ?? (_additional = new ChannelInfoExtend(_extendValues));
[JsonIgnore]
public IAttributes Attributes => Additional;
public Dictionary<string, object> ToDictionary()
{
var jObject = JObject.FromObject(this);
var relatedIdentities = RelatedIdentities.GetChannelRelatedIdentities(SiteId, Id);
var styleInfoList = TableStyleManager.GetTableStyleInfoList(DataProvider.ChannelDao.TableName, relatedIdentities);
foreach (var styleInfo in styleInfoList)
{
jObject[styleInfo.AttributeName] = Attributes.GetString(styleInfo.AttributeName);
}
var siteInfo = SiteManager.GetSiteInfo(SiteId);
if (!string.IsNullOrEmpty(ImageUrl))
{
jObject[nameof(ImageUrl)] = PageUtility.ParseNavigationUrl(siteInfo, ImageUrl, false);
}
jObject["NavigationUrl"] = PageUtility.GetChannelUrl(siteInfo, this, false);
return jObject.ToObject<Dictionary<string, object>>();
}
}
}

4
SiteServer.CMS/Provider/ContentDao.cs

@ -967,7 +967,7 @@ WHERE {nameof(ContentInfo.Id)} = @{nameof(ContentInfo.Id)}";
{
if (!string.IsNullOrEmpty(tableName))
{
channelInfo.Additional.IsPreviewContents = false;
channelInfo.Additional.IsPreviewContentsExists = false;
DataProvider.ChannelDao.UpdateAdditional(channelInfo);
string sqlString =
@ -1542,7 +1542,7 @@ group by tmp.userName";
public int InsertPreview(string tableName, SiteInfo siteInfo, ChannelInfo channelInfo, ContentInfo contentInfo)
{
channelInfo.Additional.IsPreviewContents = true;
channelInfo.Additional.IsPreviewContentsExists = true;
DataProvider.ChannelDao.UpdateAdditional(channelInfo);
contentInfo.SourceId = SourceManager.Preview;

6
SiteServer.CMS/Provider/TagDao.cs

@ -32,7 +32,7 @@ namespace SiteServer.CMS.Provider
{
AttributeName = nameof(TagInfo.ContentIdCollection),
DataType = DataType.VarChar,
DataLength = 255
DataLength = 2000
},
new TableColumn
{
@ -60,7 +60,7 @@ namespace SiteServer.CMS.Provider
var parms = new IDataParameter[]
{
GetParameter(ParmSiteId, DataType.Integer, tagInfo.SiteId),
GetParameter(ParmContentIdCollection, DataType.VarChar, 255, tagInfo.ContentIdCollection),
GetParameter(ParmContentIdCollection, DataType.VarChar, 2000, tagInfo.ContentIdCollection),
GetParameter(ParmTag, DataType.VarChar, 255, tagInfo.Tag),
GetParameter(ParmUseNum, DataType.Integer, tagInfo.UseNum)
};
@ -74,7 +74,7 @@ namespace SiteServer.CMS.Provider
var parms = new IDataParameter[]
{
GetParameter(ParmContentIdCollection, DataType.VarChar, 255, tagInfo.ContentIdCollection),
GetParameter(ParmContentIdCollection, DataType.VarChar, 2000, tagInfo.ContentIdCollection),
GetParameter(ParmUseNum, DataType.Integer, tagInfo.UseNum),
GetParameter(ParmId, DataType.Integer, tagInfo.Id)
};

2
SiteServer.CMS/StlParser/StlElement/StlChannel.cs

@ -194,7 +194,7 @@ namespace SiteServer.CMS.StlParser.StlElement
if (contextInfo.IsStlEntity && string.IsNullOrEmpty(type))
{
return channel;
return channel.ToDictionary();
}
return ParseImpl(pageInfo, contextInfo, leftText, rightText, type, formatString, separator, startIndex, length, wordNum, ellipsis, replace, to, isClearTags, isReturnToBr, isLower, isUpper, channel, channelId);

5
SiteServer.CMS/StlParser/StlElement/StlChannels.cs

@ -4,7 +4,6 @@ using System.Data;
using System.Web.UI.WebControls;
using SiteServer.CMS.Core;
using SiteServer.Utils;
using SiteServer.CMS.Model;
using SiteServer.CMS.Model.Attributes;
using SiteServer.CMS.Model.Enumerations;
using SiteServer.CMS.StlParser.Model;
@ -132,7 +131,7 @@ namespace SiteServer.CMS.StlParser.StlElement
private static object ParseEntity(PageInfo pageInfo, DataSet dataSource)
{
var channelInfoList = new List<ChannelInfo>();
var channelInfoList = new List<Dictionary<string,object>>();
var table = dataSource.Tables[0];
foreach (DataRow row in table.Rows)
{
@ -141,7 +140,7 @@ namespace SiteServer.CMS.StlParser.StlElement
var channelInfo = ChannelManager.GetChannelInfo(pageInfo.SiteId, channelId);
if (channelInfo != null)
{
channelInfoList.Add(channelInfo);
channelInfoList.Add(channelInfo.ToDictionary());
}
}

10
SiteServer.Utils/StringUtils.cs

@ -1078,6 +1078,16 @@ namespace SiteServer.Utils
return parsedContent;
}
if (toList.Count == 1)
{
foreach (var replaceStr in replaceList)
{
parsedContent = parsedContent.Replace(replaceStr, to);
}
return parsedContent;
}
}
string retval;

4
appveyor.yml

@ -3,7 +3,7 @@
only:
- master
version: 6.5.{build}
version: 6.6.{build}
image: Visual Studio 2017
assembly_info:
@ -83,7 +83,7 @@
only:
- dev
version: 6.5.{build}-beta
version: 6.6.{build}-beta
image: Visual Studio 2017
assembly_info:

Loading…
Cancel
Save