Fixing strange merge issues.

This commit is contained in:
Shannon Deminick
2013-03-02 03:44:43 +06:00
parent 4b54edf660
commit 3ff88bc4fa
3 changed files with 0 additions and 86 deletions

View File

@@ -38,46 +38,6 @@ namespace Umbraco.Web.Models
private IEnumerable<IPublishedContent> _ownersCollection;
/// <summary>
/// Need to get/set the owner collection when an item is returned from the result set of a query
/// </summary>
/// <remarks>
/// Based on this issue here: http://issues.umbraco.org/issue/U4-1797
/// </remarks>
IEnumerable<IPublishedContent> IOwnerCollectionAware<IPublishedContent>.OwnersCollection
{
get
{
var publishedContentBase = PublishedContent as IOwnerCollectionAware<IPublishedContent>;
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<IPublishedContent>;
if (publishedContentBase != null)
{
publishedContentBase.OwnersCollection = value;
}
else
{
_ownersCollection = value;
}
}
}
private IEnumerable<IPublishedContent> _ownersCollection;
/// <summary>
/// Need to get/set the owner collection when an item is returned from the result set of a query
/// </summary>

View File

@@ -44,29 +44,6 @@ namespace Umbraco.Web.Models
Initialize();
}
private IEnumerable<IPublishedContent> _ownersCollection;
/// <summary>
/// Need to get/set the owner collection when an item is returned from the result set of a query
/// </summary>
/// <remarks>
/// Based on this issue here: http://issues.umbraco.org/issue/U4-1797
/// </remarks>
IEnumerable<IPublishedContent> IOwnerCollectionAware<IPublishedContent>.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<IPublishedContent> _children = new Collection<IPublishedContent>();
private IPublishedContent _parent = null;

View File

@@ -782,29 +782,6 @@ namespace Umbraco.Web
return test(content) ? new HtmlString(valueIfTrue) : new HtmlString(valueIfFalse);
}
/// <summary>
/// Return the owners collection of the current content item.
/// </summary>
/// <param name="content"></param>
/// <returns></returns>
/// <remarks>
/// 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
/// </remarks>
private static IEnumerable<IPublishedContent> 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<IPublishedContent>;
var ownersList = publishedContentBase != null
? publishedContentBase.OwnersCollection
: content.Siblings();
return ownersList;
}
#endregion
#region Ancestors