From 6f5e742ea15426d4d976b4f4bd698565c476972d Mon Sep 17 00:00:00 2001 From: pgregorynz Date: Tue, 23 Feb 2010 22:03:04 +0000 Subject: [PATCH] WORK IN PROGRESS, GET STABLE SOURCE FROM DOWNLOAD TAB Fixes issue #26148 Publish All in beta 4.1 resets the document template [TFS Changeset #64148] --- umbraco/cms/businesslogic/web/Document.cs | 14 +- .../presentation/umbraco.presentation.csproj | 5 +- umbraco/presentation/web.config | 221 ++++++++++++++++++ umbraco/presentation/web.config.PETER-PC.xslt | 25 ++ 4 files changed, 259 insertions(+), 6 deletions(-) create mode 100644 umbraco/presentation/web.config create mode 100644 umbraco/presentation/web.config.PETER-PC.xslt diff --git a/umbraco/cms/businesslogic/web/Document.cs b/umbraco/cms/businesslogic/web/Document.cs index 4f978b2c0d..938b38c6b6 100644 --- a/umbraco/cms/businesslogic/web/Document.cs +++ b/umbraco/cms/businesslogic/web/Document.cs @@ -59,7 +59,7 @@ namespace umbraco.cms.businesslogic.web "; private const string m_SQLOptimizedChildren = @" select - count(children.id) as children, umbracoNode.id, umbracoNode.uniqueId, umbracoNode.level, umbracoNode.parentId, cmsDocument.documentUser, umbracoNode.path, umbracoNode.sortOrder, coalesce(publishCheck.published,0) as published, umbracoNode.createDate, cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsContentType.icon, cmsContentType.alias, cmsContentType.thumbnail, cmsContentType.description, cmsContentType.masterContentType, cmsContentType.nodeId as contentTypeId + count(children.id) as children, umbracoNode.id, umbracoNode.uniqueId, umbracoNode.level, umbracoNode.parentId, cmsDocument.documentUser, cmsDocument.templateId, umbracoNode.path, umbracoNode.sortOrder, coalesce(publishCheck.published,0) as published, umbracoNode.createDate, cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsContentType.icon, cmsContentType.alias, cmsContentType.thumbnail, cmsContentType.description, cmsContentType.masterContentType, cmsContentType.nodeId as contentTypeId from umbracoNode left join umbracoNode children on children.parentId = umbracoNode.id inner join cmsContent on cmsContent.nodeId = umbracoNode.id @@ -72,7 +72,7 @@ namespace umbraco.cms.businesslogic.web inner join cmsDocument on cmsDocument.versionId = cmsContentversion.versionId left join cmsDocument publishCheck on publishCheck.nodeId = cmsContent.nodeID and publishCheck.published = 1 where {0} - group by umbracoNode.id, umbracoNode.uniqueId, umbracoNode.level, umbracoNode.parentId, cmsDocument.documentUser, umbracoNode.path, umbracoNode.sortOrder, coalesce(publishCheck.published,0), umbracoNode.createDate, cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsContentType.icon, cmsContentType.alias, cmsContentType.thumbnail, cmsContentType.description, cmsContentType.masterContentType, cmsContentType.nodeId + group by umbracoNode.id, umbracoNode.uniqueId, umbracoNode.level, umbracoNode.parentId, cmsDocument.documentUser, cmsDocument.templateId, umbracoNode.path, umbracoNode.sortOrder, coalesce(publishCheck.published,0), umbracoNode.createDate, cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsContentType.icon, cmsContentType.alias, cmsContentType.thumbnail, cmsContentType.description, cmsContentType.masterContentType, cmsContentType.nodeId order by {1} "; @@ -493,7 +493,9 @@ namespace umbraco.cms.businesslogic.web , dr.GetString("thumbnail") , dr.GetString("description") , masterContentType - , dr.GetInt("contentTypeId")); + , dr.GetInt("contentTypeId") + , dr.GetInt("templateId") + ); // initialize content object InitializeContent(dr.GetInt("ContentType"), dr.GetGuid("versionId"), @@ -1242,7 +1244,8 @@ namespace umbraco.cms.businesslogic.web , dr.GetString("thumbnail") , dr.GetString("description") , masterContentType - , dr.GetInt("contentTypeId")); + , dr.GetInt("contentTypeId") + ,dr.GetInt("templateId")); tmp.Add(d); } } @@ -1258,7 +1261,7 @@ namespace umbraco.cms.businesslogic.web private void SetupDocumentForTree(Guid uniqueId, int level, int parentId, int user, bool publish, string path, string text, DateTime createDate, DateTime updateDate, DateTime versionDate, string icon, bool hasChildren, string contentTypeAlias, string contentTypeThumb, - string contentTypeDesc, int? masterContentType, int contentTypeId) + string contentTypeDesc, int? masterContentType, int contentTypeId, int templateId) { SetupNodeForTree(uniqueId, _objectType, level, parentId, user, path, text, createDate, hasChildren); @@ -1266,6 +1269,7 @@ namespace umbraco.cms.businesslogic.web _updated = updateDate; ContentType = new ContentType(contentTypeId, contentTypeAlias, icon, contentTypeThumb, masterContentType); ContentTypeIcon = icon; + Template = templateId; VersionDate = versionDate; } diff --git a/umbraco/presentation/umbraco.presentation.csproj b/umbraco/presentation/umbraco.presentation.csproj index 828327a6d3..2ff56985fe 100644 --- a/umbraco/presentation/umbraco.presentation.csproj +++ b/umbraco/presentation/umbraco.presentation.csproj @@ -1,6 +1,6 @@  - 9.0.21022 + 9.0.30729 2.0 {651E1350-91B6-44B7-BD60-7207006D7003} {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} @@ -1465,6 +1465,7 @@ + @@ -2801,6 +2802,7 @@ umbraco.xsd + @@ -2822,6 +2824,7 @@ + diff --git a/umbraco/presentation/web.config b/umbraco/presentation/web.config new file mode 100644 index 0000000000..a2e0224d4c --- /dev/null +++ b/umbraco/presentation/web.config @@ -0,0 +1,221 @@ + + + +
+
+ + + +
+ +
+
+
+
+ + + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://regexlib.com/WebServices.asmx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/umbraco/presentation/web.config.PETER-PC.xslt b/umbraco/presentation/web.config.PETER-PC.xslt new file mode 100644 index 0000000000..ad1838ebfa --- /dev/null +++ b/umbraco/presentation/web.config.PETER-PC.xslt @@ -0,0 +1,25 @@ + + + + + + + server=.\sqlexpress;database=umbraco41;integrated security=false;user id=sa;pwd=password + + + + 4.1.0.betaII + + + + + + + + + + + + + +