Fixed a couple threading issues. Improved the performance of the nodeSorter but this should be better improved in 6.x
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Xml;
|
||||
|
||||
using umbraco.cms.businesslogic.web;
|
||||
@@ -1036,6 +1036,12 @@ order by level,sortOrder";
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This needs to be synchronized since we are doing multiple sql operations in one method
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="versionId"></param>
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
protected void SavePreviewXml(XmlNode x, Guid versionId)
|
||||
{
|
||||
string sql = PreviewExists(versionId) ? "UPDATE cmsPreviewXml SET xml = @xml, timestamp = @timestamp WHERE nodeId=@nodeId AND versionId = @versionId"
|
||||
|
||||
@@ -1756,6 +1756,10 @@ where published = 1 And nodeId = @nodeId And trashed = 0", SqlHelper.CreateParam
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is a specialized method which literally just makes sure that the sortOrder attribute of the xml
|
||||
/// that is stored in the database is up to date.
|
||||
/// </summary>
|
||||
public void refreshXmlSortOrder()
|
||||
{
|
||||
if (Published)
|
||||
@@ -2002,6 +2006,11 @@ where published = 1 And nodeId = @nodeId And trashed = 0", SqlHelper.CreateParam
|
||||
return temp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This needs to be synchronized since we're doing multiple sql operations in the single method
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
private void saveXml(XmlNode x)
|
||||
{
|
||||
bool exists = (SqlHelper.ExecuteScalar<int>("SELECT COUNT(nodeId) FROM cmsContentXml WHERE nodeId=@nodeId",
|
||||
|
||||
Reference in New Issue
Block a user