diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj
index 6d1b7ae162..2016cd75a0 100644
--- a/src/Umbraco.Web/Umbraco.Web.csproj
+++ b/src/Umbraco.Web/Umbraco.Web.csproj
@@ -1411,9 +1411,6 @@
nodeSorter.asmx
Component
-
- ASPXCodeBehind
-
diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs
index 854f5a46b5..831e3c5cdc 100644
--- a/src/Umbraco.Web/UmbracoContext.cs
+++ b/src/Umbraco.Web/UmbracoContext.cs
@@ -253,15 +253,14 @@ namespace Umbraco.Web
///
public int? PageId
{
- // TODO - this is dirty old legacy tricks, we should clean it up at some point
- // also, what is a "custom page" and when should this be either null, or different
- // from PublishedContentRequest.PublishedContent.Id ??
- // SD: Have found out it can be different when rendering macro contents in the back office, but really youshould just be able
- // to pass a page id to the macro renderer instead but due to all the legacy bits that's real difficult.
get
{
try
{
+ // This was changed but the comments used to refer to
+ // macros in the backoffice not working with this Id
+ // it's probably not a problem any more though. Old comment:
+ // https://github.com/umbraco/Umbraco-CMS/blob/7a615133ff9de84ee667fb7794169af65e2b4d7a/src/Umbraco.Web/UmbracoContext.cs#L256
return Current.PublishedRequest.PublishedContent.Id;
}
catch
diff --git a/src/Umbraco.Web/umbraco.presentation/page.cs b/src/Umbraco.Web/umbraco.presentation/page.cs
index a1da34d46e..ac35c336b2 100644
--- a/src/Umbraco.Web/umbraco.presentation/page.cs
+++ b/src/Umbraco.Web/umbraco.presentation/page.cs
@@ -3,18 +3,13 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using System.Web;
using System.Web.UI;
-using System.Xml;
using Umbraco.Core;
-using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Web.Editors;
using Umbraco.Web.Routing;
-using Umbraco.Core.Configuration;
using Umbraco.Core.PropertyEditors;
-using Umbraco.Web;
using Umbraco.Web.Composing;
namespace umbraco
@@ -146,55 +141,7 @@ namespace umbraco
_elements.Add("path", path);
_elements.Add("splitpath", _splitpath);
}
-
- void populatePageData(XmlNode node)
- {
- string s;
- DateTime dt;
- Guid guid;
- int i;
-
- if (int.TryParse(attrValue(node, "id"), out i))
- _elements["pageID"] = this._pageId = i;
-
- if ((s = attrValue(node, "nodeName")) != null)
- _elements["pageName"] = this._pageName = s;
-
- if (int.TryParse(attrValue(node, "parentId"), out i))
- _elements["parentId"] = this._parentId = i;
-
- if (int.TryParse(attrValue(node, "nodeType"), out i))
- _elements["nodeType"] = this._nodeType = i;
- if ((s = attrValue(node, "nodeTypeAlias")) != null)
- _elements["nodeTypeAlias"] = this._nodeTypeAlias = s;
-
- if ((s = attrValue(node, "writerName")) != null)
- _elements["writerName"] = this._writerName = s;
- if ((s = attrValue(node, "creatorName")) != null)
- _elements["creatorName"] = this._creatorName = s;
-
- if (DateTime.TryParse(attrValue(node, "createDate"), out dt))
- _elements["createDate"] = this._createDate = dt;
- if (DateTime.TryParse(attrValue(node, "updateDate"), out dt))
- _elements["updateDate"] = this._updateDate = dt;
-
- if (Guid.TryParse(attrValue(node, "pageVersion"), out guid))
- _elements["pageVersion"] = this._pageVersion = guid;
-
- if ((s = attrValue(node, "path")) != null)
- {
- _elements["path"] = this._path = s;
- _elements["splitpath"] = this._splitpath = _path.Split(',');
- }
- }
-
- string attrValue(XmlNode node, string attributeName)
- {
- var attr = node.Attributes.GetNamedItem(attributeName);
- var value = attr != null ? attr.Value : null;
- return value;
- }
-
+
///
/// Puts the properties of the node into the elements table
///
@@ -217,42 +164,6 @@ namespace umbraco
}
}
}
-
- void populateElementData(XmlNode node)
- {
- string xpath = "./* [not(@isDoc)]";
-
- foreach (XmlNode data in node.SelectNodes(xpath))
- {
- // ignore empty elements
- if (data.ChildNodes.Count == 0)
- continue;
-
- string alias = data.Name;
- string value = data.FirstChild.Value;
-
- // moved to PublishedContentRequest + UmbracoModule
- //if (alias == "umbracoRedirect")
- //{
- // int i;
- // if (int.TryParse(value, out i))
- // HttpContext.Current.Response.Redirect(library.NiceUrl(int.Parse(data.FirstChild.Value)), true);
- //}
-
- if (_elements.ContainsKey(alias))
- {
- Current.Logger.Debug(
- string.Format("Aliases must be unique, an element with alias \"{0}\" has already been loaded!", alias));
- }
- else
- {
- _elements[alias] = value;
- Current.Logger.Debug(
- string.Format("Load element \"{0}\"", alias));
- }
- }
- }
-
#endregion
#region Public properties
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Web/UI/ContentPage.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Web/UI/ContentPage.cs
deleted file mode 100644
index 7dcb287740..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Web/UI/ContentPage.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-
-namespace umbraco.presentation.Web.UI
-{
- ///
- /// Summary description for ContentPage.
- ///
- public class ContentPage : System.Web.UI.Page
- {
- private int _id = 0;
-
- public int UmbracoNodeId
- {
- set { _id = value; }
- get {return _id;}
- }
- public ContentPage()
- {
- }
- }
-}