From fa4b768aa3d4bb1155278c5c4fd330b420ebca52 Mon Sep 17 00:00:00 2001 From: pgregorynz Date: Tue, 24 Aug 2010 08:11:06 +0000 Subject: [PATCH] Fixes issue 28648 Umbraco item does not have creatorName [TFS Changeset #76339] --- umbraco/presentation/page.cs | 20 +++++++++++++++++-- .../sendToTranslation.aspx.designer.cs | 3 +-- .../umbraco/dialogs/umbracoField.aspx.cs | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/umbraco/presentation/page.cs b/umbraco/presentation/page.cs index b3fc1aa728..547de6d6ba 100644 --- a/umbraco/presentation/page.cs +++ b/umbraco/presentation/page.cs @@ -21,6 +21,7 @@ namespace umbraco private String pageName; private int parentId; private String writerName; + private String creatorName; private String path; private int nodeType; private String nodeTypeAlias; @@ -59,7 +60,7 @@ namespace umbraco { } // create page - populatePageData(Id, d.Text, d.ContentType.Id, d.ContentType.Alias, d.User.Name, d.CreateDateTime, + populatePageData(Id, d.Text, d.ContentType.Id, d.ContentType.Alias, d.User.Name, d.Creator.Name, d.CreateDateTime, d.UpdateDate, d.Path, d.Version, tmpParentId); // update page elements @@ -76,7 +77,7 @@ namespace umbraco // RenderPage(template); } - private void populatePageData(int pageID, string pageName, int nodeType, string nodeTypeAlias, string writerName, + private void populatePageData(int pageID, string pageName, int nodeType, string nodeTypeAlias, string writerName, string creatorName, DateTime createDate, DateTime updateDate, string path, Guid pageVersion, int parentId) { @@ -85,6 +86,7 @@ namespace umbraco this.nodeType = nodeType; this.nodeTypeAlias = nodeTypeAlias; this.writerName = writerName; + this.creatorName = creatorName; this.createDate = createDate; this.updateDate = updateDate; this.parentId = parentId; @@ -99,6 +101,7 @@ namespace umbraco elements.Add("nodeType", nodeType); elements.Add("nodeTypeAlias", nodeTypeAlias); elements.Add("writerName", writerName); + elements.Add("creatorName", creatorName); elements.Add("createDate", createDate); elements.Add("updateDate", updateDate); elements.Add("path", path); @@ -146,6 +149,14 @@ namespace umbraco { } try + { + creatorName = xmlNode.Attributes.GetNamedItem("creatorName").Value; + elements.Add("creatorName", creatorName); + } + catch + { + } + try { createDate = Convert.ToDateTime(xmlNode.Attributes.GetNamedItem("createDate").Value); elements.Add("createDate", createDate); @@ -328,6 +339,11 @@ namespace umbraco get { return writerName; } } + public String CreatorName + { + get { return creatorName; } + } + public DateTime CreateDate { get { return createDate; } diff --git a/umbraco/presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs index 9a963b6915..f111990471 100644 --- a/umbraco/presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ diff --git a/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.cs b/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.cs index 361a97b828..111e77edca 100644 --- a/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.cs @@ -18,7 +18,7 @@ namespace umbraco.dialogs /// public partial class umbracoField : BasePages.UmbracoEnsuredPage { - string[] preValuesSource = {"@pageID", "@parentID", "@level", "@writerID", "@nodeType", "@template", "@createDate", "@updateDate", "@pageName", "@urlName", "@writerName", "@nodeTypeAlias", "@path"}; + string[] preValuesSource = { "@createDate", "@creatorName", "@level", "@nodeType", "@nodeTypeAlias", "@pageID", "@pageName", "@parentID", "@path", "@template", "@updateDate", "@writerID", "@writerName" }; bool m_IsDictionaryMode = false; protected void Page_Load(object sender, System.EventArgs e)