Fixes issue 28648 Umbraco item does not have creatorName

[TFS Changeset #76339]
This commit is contained in:
pgregorynz
2010-08-24 08:11:06 +00:00
parent 5fd5852a68
commit fa4b768aa3
3 changed files with 20 additions and 5 deletions

View File

@@ -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; }

View File

@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------

View File

@@ -18,7 +18,7 @@ namespace umbraco.dialogs
/// </summary>
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)