From 3ff88bc4fa5d98fb4d638e54d21f2df18196e413 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Sat, 2 Mar 2013 03:44:43 +0600 Subject: [PATCH] Fixing strange merge issues. --- .../Models/DynamicPublishedContent.cs | 40 ------------------- src/Umbraco.Web/Models/XmlPublishedContent.cs | 23 ----------- src/Umbraco.Web/PublishedContentExtensions.cs | 23 ----------- 3 files changed, 86 deletions(-) diff --git a/src/Umbraco.Web/Models/DynamicPublishedContent.cs b/src/Umbraco.Web/Models/DynamicPublishedContent.cs index 875de8a362..0cf3ed24a8 100644 --- a/src/Umbraco.Web/Models/DynamicPublishedContent.cs +++ b/src/Umbraco.Web/Models/DynamicPublishedContent.cs @@ -38,46 +38,6 @@ namespace Umbraco.Web.Models private IEnumerable _ownersCollection; - /// - /// Need to get/set the owner collection when an item is returned from the result set of a query - /// - /// - /// Based on this issue here: http://issues.umbraco.org/issue/U4-1797 - /// - IEnumerable IOwnerCollectionAware.OwnersCollection - { - get - { - var publishedContentBase = PublishedContent as IOwnerCollectionAware; - if (publishedContentBase != null) - { - return publishedContentBase.OwnersCollection; - } - - //if the owners collection is null, we'll default to it's siblings - if (_ownersCollection == null) - { - //get the root docs if parent is null - _ownersCollection = this.Siblings(); - } - return _ownersCollection; - } - set - { - var publishedContentBase = PublishedContent as IOwnerCollectionAware; - if (publishedContentBase != null) - { - publishedContentBase.OwnersCollection = value; - } - else - { - _ownersCollection = value; - } - } - } - - private IEnumerable _ownersCollection; - /// /// Need to get/set the owner collection when an item is returned from the result set of a query /// diff --git a/src/Umbraco.Web/Models/XmlPublishedContent.cs b/src/Umbraco.Web/Models/XmlPublishedContent.cs index 299d3bf083..867fc8c144 100644 --- a/src/Umbraco.Web/Models/XmlPublishedContent.cs +++ b/src/Umbraco.Web/Models/XmlPublishedContent.cs @@ -44,29 +44,6 @@ namespace Umbraco.Web.Models Initialize(); } - private IEnumerable _ownersCollection; - - /// - /// Need to get/set the owner collection when an item is returned from the result set of a query - /// - /// - /// Based on this issue here: http://issues.umbraco.org/issue/U4-1797 - /// - IEnumerable IOwnerCollectionAware.OwnersCollection - { - get - { - //if the owners collection is null, we'll default to it's siblings - if (_ownersCollection == null) - { - //get the root docs if parent is null - _ownersCollection = this.Siblings(); - } - return _ownersCollection; - } - set { _ownersCollection = value; } - } - private bool _initialized = false; private readonly ICollection _children = new Collection(); private IPublishedContent _parent = null; diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 1fb0271681..e1951b0dfb 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -782,29 +782,6 @@ namespace Umbraco.Web return test(content) ? new HtmlString(valueIfTrue) : new HtmlString(valueIfFalse); } - /// - /// Return the owners collection of the current content item. - /// - /// - /// - /// - /// If the content item is of type PublishedContentBase we will have a property called OwnersCollection which will - /// be the collection of a resultant set (i.e. from a where clause, a call to Children(), etc...) otherwise it will - /// be the item's siblings. All relates to this issue: http://issues.umbraco.org/issue/U4-1797 - /// - private static IEnumerable GetOwnersList(this IPublishedContent content) - { - //Here we need to type check, we need to see if we have a real OwnersCollection list based on the result set - // of a query, otherwise we can only lookup among the item's siblings. All related to this issue here: - // http://issues.umbraco.org/issue/U4-1797 - - var publishedContentBase = content as IOwnerCollectionAware; - var ownersList = publishedContentBase != null - ? publishedContentBase.OwnersCollection - : content.Siblings(); - return ownersList; - } - #endregion #region Ancestors