From 40a413cd700dc8d1d120e680833eec00d25a395f Mon Sep 17 00:00:00 2001 From: callicj Date: Sun, 7 Oct 2012 11:28:43 -0200 Subject: [PATCH] Added releaseDate, expireDate columns to the query defined on m_SQLOptimizedMany so the corresponding fields are populated when this query is used to load the object. --- src/umbraco.cms/businesslogic/web/Document.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/umbraco.cms/businesslogic/web/Document.cs b/src/umbraco.cms/businesslogic/web/Document.cs index 8add844687..10f4195f72 100644 --- a/src/umbraco.cms/businesslogic/web/Document.cs +++ b/src/umbraco.cms/businesslogic/web/Document.cs @@ -185,7 +185,7 @@ namespace umbraco.cms.businesslogic.web select count(children.id) as children, umbracoNode.id, umbracoNode.uniqueId, umbracoNode.level, umbracoNode.parentId, cmsDocument.documentUser, coalesce(cmsDocument.templateId, cmsDocumentType.templateNodeId) as templateId, umbracoNode.path, umbracoNode.sortOrder, coalesce(publishCheck.published,0) as isPublished, umbracoNode.createDate, - cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsContentType.icon, cmsContentType.alias, + cmsDocument.text, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsDocument.releaseDate, cmsDocument.expireDate, cmsContentType.icon, cmsContentType.alias, cmsContentType.thumbnail, cmsContentType.description, cmsContentType.masterContentType, cmsContentType.nodeId as contentTypeId, umbracoNode.nodeUser from umbracoNode @@ -202,7 +202,7 @@ namespace umbraco.cms.businesslogic.web cmsDocument.templateId, cmsDocumentType.templateNodeId, umbracoNode.path, umbracoNode.sortOrder, coalesce(publishCheck.published,0), umbracoNode.createDate, cmsDocument.text, cmsContentType.icon, cmsContentType.alias, cmsContentType.thumbnail, cmsContentType.description, - cmsContentType.masterContentType, cmsContentType.nodeId, cmsDocument.updateDate, cmsContentVersion.versionDate, umbracoNode.nodeUser + cmsContentType.masterContentType, cmsContentType.nodeId, cmsDocument.updateDate, cmsContentVersion.versionDate, cmsDocument.releaseDate, cmsDocument.expireDate, umbracoNode.nodeUser order by {1} "; @@ -1697,6 +1697,11 @@ namespace umbraco.cms.businesslogic.web , masterContentType , dr.GetInt("contentTypeId") , dr.GetInt("templateId")); + + if (!dr.IsNull("releaseDate")) + _release = dr.GetDateTime("releaseDate"); + if (!dr.IsNull("expireDate")) + _expire = dr.GetDateTime("expireDate"); } protected void SaveXmlPreview(XmlDocument xd)