Finds all other instances where a reader would be executed inside another reader's loop and fixes
This commit is contained in:
@@ -131,9 +131,7 @@ namespace Umbraco.Web.Cache
|
||||
ClearAllIsolatedCacheByEntityType<IMediaType>();
|
||||
ClearAllIsolatedCacheByEntityType<IMember>();
|
||||
ClearAllIsolatedCacheByEntityType<IMemberType>();
|
||||
|
||||
//all property type cache
|
||||
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.PropertyTypeCacheKey);
|
||||
|
||||
//all content type property cache
|
||||
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.ContentTypePropertiesCacheKey);
|
||||
//all content type cache
|
||||
@@ -266,12 +264,6 @@ namespace Umbraco.Web.Cache
|
||||
/// </returns>
|
||||
private static void ClearContentTypeCache(JsonPayload payload)
|
||||
{
|
||||
//clears the cache for each property type associated with the content type
|
||||
foreach (var pid in payload.PropertyTypeIds)
|
||||
{
|
||||
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheItem(CacheKeys.PropertyTypeCacheKey + pid);
|
||||
}
|
||||
|
||||
//clears the cache associated with the Content type itself
|
||||
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheItem(string.Format("{0}{1}", CacheKeys.ContentTypeCacheKey, payload.Id));
|
||||
//clears the cache associated with the content type properties collection
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using Umbraco.Core.IO;
|
||||
using System.Linq;
|
||||
@@ -11,6 +12,8 @@ namespace umbraco.controls
|
||||
/// <summary>
|
||||
/// Summary description for ContentTypeControl.
|
||||
/// </summary>
|
||||
[Obsolete("No longer used, will be removed in v8")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class ContentTypeControl : uicontrols.TabView
|
||||
{
|
||||
public event System.EventHandler OnSave;
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Configuration.Provider;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
@@ -320,13 +321,14 @@ namespace umbraco.cms.presentation.user
|
||||
}
|
||||
|
||||
// Populate dropdowns
|
||||
foreach (DocumentType dt in DocumentType.GetAllAsList())
|
||||
cDocumentType.Items.Add(
|
||||
new ListItem(dt.Text, dt.Alias)
|
||||
);
|
||||
var allContentTypes = Services.ContentTypeService.GetAllContentTypes().ToList();
|
||||
foreach (var dt in allContentTypes)
|
||||
{
|
||||
cDocumentType.Items.Add(new ListItem(dt.Name, dt.Alias));
|
||||
}
|
||||
|
||||
// populate fields
|
||||
ArrayList fields = new ArrayList();
|
||||
var fields = new ArrayList();
|
||||
cDescription.ID = "cDescription";
|
||||
cCategories.ID = "cCategories";
|
||||
cExcerpt.ID = "cExcerpt";
|
||||
@@ -334,9 +336,9 @@ namespace umbraco.cms.presentation.user
|
||||
cCategories.Items.Add(new ListItem(ui.Text("choose"), ""));
|
||||
cExcerpt.Items.Add(new ListItem(ui.Text("choose"), ""));
|
||||
|
||||
foreach (PropertyType pt in PropertyType.GetAll())
|
||||
foreach (var pt in allContentTypes.SelectMany(x => x.PropertyTypes).OrderBy(x => x.Name))
|
||||
{
|
||||
if (!fields.Contains(pt.Alias))
|
||||
if (fields.Contains(pt.Alias) == false)
|
||||
{
|
||||
cDescription.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias));
|
||||
cCategories.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias));
|
||||
|
||||
Reference in New Issue
Block a user