Generated query was very very wrong :)
This commit is contained in:
@@ -150,21 +150,12 @@ namespace Umbraco.Core.Persistence.Querying
|
||||
|
||||
protected virtual string VisitMemberAccess(MemberExpression m)
|
||||
{
|
||||
if (m.Expression != null &&
|
||||
m.Expression.NodeType == ExpressionType.Parameter
|
||||
&& m.Expression.Type == typeof(T))
|
||||
if (m.Expression != null && m.Expression.NodeType == ExpressionType.Parameter && m.Expression.Type == typeof(T))
|
||||
{
|
||||
var field = _mapper.Map(m.Member.Name);
|
||||
return field;
|
||||
}
|
||||
|
||||
if (m.Expression != null && m.Expression.NodeType != ExpressionType.Constant)
|
||||
{
|
||||
var field = _mapper.Map(m.Member.Name);
|
||||
return field;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var member = Expression.Convert(m, typeof(object));
|
||||
var lambda = Expression.Lambda<Func<object>>(member);
|
||||
var getter = lambda.Compile();
|
||||
@@ -190,9 +181,7 @@ namespace Umbraco.Core.Persistence.Querying
|
||||
var r = new StringBuilder();
|
||||
foreach (Object e in exprs)
|
||||
{
|
||||
r.AppendFormat("{0}{1}",
|
||||
r.Length > 0 ? "," : "",
|
||||
e);
|
||||
r.AppendFormat("{0}{1}", r.Length > 0 ? "," : "", e);
|
||||
}
|
||||
return r.ToString();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Caching;
|
||||
using umbraco.BusinessLogic.Actions;
|
||||
using umbraco.IO;
|
||||
@@ -321,14 +323,15 @@ namespace umbraco.cms.presentation
|
||||
library.UpdateDocumentCache(_document.Id);
|
||||
ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editContentPublishedHeader", null), ui.Text("speechBubbles", "editContentPublishedText", null));
|
||||
|
||||
littPublishStatus.Text = ui.Text("content", "lastPublished", base.getUser()) + ": " + _document.VersionDate.ToString() + "<br/>";
|
||||
littPublishStatus.Text = string.Format("{0}: {1}<br/>", ui.Text("content", "lastPublished", base.getUser()), _document.VersionDate.ToString());
|
||||
|
||||
if (base.getUser().GetPermissions(_document.Path).IndexOf("U") > -1)
|
||||
UnPublish.Visible = true;
|
||||
|
||||
_documentHasPublishedVersion = _document.HasPublishedVersion();
|
||||
|
||||
foreach (var descendant in _document.GetDescendants().Cast<Document>().Where(descendant => descendant.HasPublishedVersion()))
|
||||
var descendants = ApplicationContext.Current.Services.ContentService.GetDescendants(_document.Id);
|
||||
foreach (var descendant in descendants.Where(descendant => descendant.HasPublishedVersion()))
|
||||
library.UpdateDocumentCache(descendant.Id);
|
||||
}
|
||||
else
|
||||
@@ -337,13 +340,10 @@ namespace umbraco.cms.presentation
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ClientTools.ShowSpeechBubble(speechBubbleIcon.warning, ui.Text("publish"), ui.Text("speechBubbles", "editContentPublishedFailedByParent"));
|
||||
|
||||
// page cache disabled...
|
||||
// cms.businesslogic.cache.Cache.ClearCacheObjectTypes("umbraco.page");
|
||||
|
||||
|
||||
// Update links
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user