Updates: #U4-2192 - moves method call to be inside of the lock.
This commit is contained in:
@@ -1057,24 +1057,27 @@ namespace umbraco
|
||||
{
|
||||
LogHelper.Debug<content>("Republishing starting");
|
||||
|
||||
// Lets cache the DTD to save on the DB hit on the subsequent use
|
||||
string dtd = DocumentType.GenerateDtd();
|
||||
lock (DbReadSyncLock)
|
||||
{
|
||||
|
||||
// Prepare an XmlDocument with an appropriate inline DTD to match
|
||||
// the expected content
|
||||
var xmlDoc = new XmlDocument();
|
||||
InitContentDocument(xmlDoc, dtd);
|
||||
// Lets cache the DTD to save on the DB hit on the subsequent use
|
||||
string dtd = DocumentType.GenerateDtd();
|
||||
|
||||
// Esben Carlsen: At some point we really need to put all data access into to a tier of its own.
|
||||
// CLN - added checks that document xml is for a document that is actually published.
|
||||
string sql =
|
||||
@"select umbracoNode.id, umbracoNode.parentId, umbracoNode.sortOrder, cmsContentXml.xml from umbracoNode
|
||||
// Prepare an XmlDocument with an appropriate inline DTD to match
|
||||
// the expected content
|
||||
var xmlDoc = new XmlDocument();
|
||||
InitContentDocument(xmlDoc, dtd);
|
||||
|
||||
// Esben Carlsen: At some point we really need to put all data access into to a tier of its own.
|
||||
// CLN - added checks that document xml is for a document that is actually published.
|
||||
string sql =
|
||||
@"select umbracoNode.id, umbracoNode.parentId, umbracoNode.sortOrder, cmsContentXml.xml from umbracoNode
|
||||
inner join cmsContentXml on cmsContentXml.nodeId = umbracoNode.id and umbracoNode.nodeObjectType = @type
|
||||
where umbracoNode.id in (select cmsDocument.nodeId from cmsDocument where cmsDocument.published = 1)
|
||||
order by umbracoNode.level, umbracoNode.sortOrder";
|
||||
|
||||
lock (DbReadSyncLock)
|
||||
{
|
||||
|
||||
|
||||
using (
|
||||
IRecordsReader dr = SqlHelper.ExecuteReader(sql,
|
||||
SqlHelper.CreateParameter("@type",
|
||||
|
||||
Reference in New Issue
Block a user