Cleanup Constants.ObjectTypes
This commit is contained in:
@@ -32,7 +32,7 @@ LEFT JOIN cmsDocument docPub ON (docPub.nodeId=n.id AND docPub.published=1)
|
||||
LEFT JOIN cmsContentNu nuDraft ON (nuDraft.nodeId=n.id AND nuDraft.published=0)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType AND n.id=@id
|
||||
", new { objType = Constants.ObjectTypes.DocumentGuid, /*id =*/ id })).FirstOrDefault();
|
||||
", new { objType = Constants.ObjectTypes.Document, /*id =*/ id })).FirstOrDefault();
|
||||
return dto == null ? new ContentNodeKit() : CreateContentNodeKit(dto);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ JOIN cmsContent ON (cmsContent.nodeId=n.id)
|
||||
JOIN cmsContentVersion ver ON (ver.contentId=n.id)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType AND n.id=@id
|
||||
", new { objType = Constants.ObjectTypes.MediaGuid, /*id =*/ id })).FirstOrDefault();
|
||||
", new { objType = Constants.ObjectTypes.Media, /*id =*/ id })).FirstOrDefault();
|
||||
return dto == null ? new ContentNodeKit() : CreateMediaNodeKit(dto);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ LEFT JOIN cmsContentNu nuDraft ON (nuDraft.nodeId=n.id AND nuDraft.published=0)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType
|
||||
ORDER BY n.level, n.sortOrder
|
||||
", new { objType = Constants.ObjectTypes.DocumentGuid })).Select(CreateContentNodeKit);
|
||||
", new { objType = Constants.ObjectTypes.Document })).Select(CreateContentNodeKit);
|
||||
}
|
||||
|
||||
public IEnumerable<ContentNodeKit> GetAllMediaSources(IScopeUnitOfWork uow)
|
||||
@@ -97,7 +97,7 @@ JOIN cmsContentVersion ver ON (ver.contentId=n.id)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType
|
||||
ORDER BY n.level, n.sortOrder
|
||||
", new { objType = Constants.ObjectTypes.MediaGuid })).Select(CreateMediaNodeKit);
|
||||
", new { objType = Constants.ObjectTypes.Media })).Select(CreateMediaNodeKit);
|
||||
}
|
||||
|
||||
public IEnumerable<ContentNodeKit> GetBranchContentSources(IScopeUnitOfWork uow, int id)
|
||||
@@ -120,7 +120,7 @@ LEFT JOIN cmsContentNu nuDraft ON (nuDraft.nodeId=n.id AND nuDraft.published=0)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType AND x.id=@id
|
||||
ORDER BY n.level, n.sortOrder
|
||||
", new { objType = Constants.ObjectTypes.DocumentGuid, /*id =*/ id })).Select(CreateContentNodeKit);
|
||||
", new { objType = Constants.ObjectTypes.Document, /*id =*/ id })).Select(CreateContentNodeKit);
|
||||
}
|
||||
|
||||
public IEnumerable<ContentNodeKit> GetBranchMediaSources(IScopeUnitOfWork uow, int id)
|
||||
@@ -141,7 +141,7 @@ JOIN cmsContentVersion ver ON (ver.contentId=n.id)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType AND x.id=@id
|
||||
ORDER BY n.level, n.sortOrder
|
||||
", new { objType = Constants.ObjectTypes.MediaGuid, /*id =*/ id })).Select(CreateMediaNodeKit);
|
||||
", new { objType = Constants.ObjectTypes.Media, /*id =*/ id })).Select(CreateMediaNodeKit);
|
||||
}
|
||||
|
||||
public IEnumerable<ContentNodeKit> GetTypeContentSources(IScopeUnitOfWork uow, IEnumerable<int> ids)
|
||||
@@ -163,7 +163,7 @@ LEFT JOIN cmsContentNu nuDraft ON (nuDraft.nodeId=n.id AND nuDraft.published=0)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType AND cmsContent.contentType IN (@ids)
|
||||
ORDER BY n.level, n.sortOrder
|
||||
", new { objType = Constants.ObjectTypes.DocumentGuid, /*id =*/ ids })).Select(CreateContentNodeKit);
|
||||
", new { objType = Constants.ObjectTypes.Document, /*id =*/ ids })).Select(CreateContentNodeKit);
|
||||
}
|
||||
|
||||
public IEnumerable<ContentNodeKit> GetTypeMediaSources(IScopeUnitOfWork uow, IEnumerable<int> ids)
|
||||
@@ -183,7 +183,7 @@ JOIN cmsContentVersion ver ON (ver.contentId=n.id)
|
||||
LEFT JOIN cmsContentNu nuPub ON (nuPub.nodeId=n.id AND nuPub.published=1)
|
||||
WHERE n.nodeObjectType=@objType AND cmsContent.contentType IN (@ids)
|
||||
ORDER BY n.level, n.sortOrder
|
||||
", new { objType = Constants.ObjectTypes.MediaGuid, /*id =*/ ids })).Select(CreateMediaNodeKit);
|
||||
", new { objType = Constants.ObjectTypes.Media, /*id =*/ ids })).Select(CreateMediaNodeKit);
|
||||
}
|
||||
|
||||
private static ContentNodeKit CreateContentNodeKit(ContentSourceDto dto)
|
||||
|
||||
@@ -1231,7 +1231,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
private void RebuildContentDbCacheLocked(IScopeUnitOfWork uow, int groupSize, IEnumerable<int> contentTypeIds)
|
||||
{
|
||||
var contentTypeIdsA = contentTypeIds?.ToArray();
|
||||
var contentObjectType = Guid.Parse(Constants.ObjectTypes.Document);
|
||||
var contentObjectType = Constants.ObjectTypes.Document;
|
||||
var db = uow.Database;
|
||||
|
||||
// remove all - if anything fails the transaction will rollback
|
||||
@@ -1302,7 +1302,7 @@ WHERE cmsContentNu.nodeId IN (
|
||||
public void RebuildMediaDbCacheLocked(IScopeUnitOfWork uow, int groupSize, IEnumerable<int> contentTypeIds)
|
||||
{
|
||||
var contentTypeIdsA = contentTypeIds?.ToArray();
|
||||
var mediaObjectType = Guid.Parse(Constants.ObjectTypes.Media);
|
||||
var mediaObjectType = Constants.ObjectTypes.Media;
|
||||
var db = uow.Database;
|
||||
|
||||
// remove all - if anything fails the transaction will rollback
|
||||
@@ -1363,7 +1363,7 @@ WHERE cmsContentNu.nodeId IN (
|
||||
public void RebuildMemberDbCacheLocked(IScopeUnitOfWork uow, int groupSize, IEnumerable<int> contentTypeIds)
|
||||
{
|
||||
var contentTypeIdsA = contentTypeIds?.ToArray();
|
||||
var memberObjectType = Guid.Parse(Constants.ObjectTypes.Member);
|
||||
var memberObjectType = Constants.ObjectTypes.Member;
|
||||
var db = uow.Database;
|
||||
|
||||
// remove all - if anything fails the transaction will rollback
|
||||
@@ -1425,7 +1425,7 @@ WHERE cmsContentNu.nodeId IN (
|
||||
// every published content item should have a corresponding row in cmsContentXml
|
||||
// every content item should have a corresponding row in cmsPreviewXml
|
||||
|
||||
var contentObjectType = Guid.Parse(Constants.ObjectTypes.Document);
|
||||
var contentObjectType = Constants.ObjectTypes.Document;
|
||||
var db = uow.Database;
|
||||
|
||||
var count = db.ExecuteScalar<int>(@"SELECT COUNT(*)
|
||||
@@ -1455,7 +1455,7 @@ AND cmsContentNu.nodeId IS NULL;"
|
||||
{
|
||||
// every non-trashed media item should have a corresponding row in cmsContentXml
|
||||
|
||||
var mediaObjectType = Guid.Parse(Constants.ObjectTypes.Media);
|
||||
var mediaObjectType = Constants.ObjectTypes.Media;
|
||||
var db = uow.Database;
|
||||
|
||||
var count = db.ExecuteScalar<int>(@"SELECT COUNT(*)
|
||||
@@ -1485,7 +1485,7 @@ AND cmsContentNu.nodeId IS NULL
|
||||
{
|
||||
// every member item should have a corresponding row in cmsContentXml
|
||||
|
||||
var memberObjectType = Guid.Parse(Constants.ObjectTypes.Member);
|
||||
var memberObjectType = Constants.ObjectTypes.Member;
|
||||
var db = uow.Database;
|
||||
|
||||
var count = db.ExecuteScalar<int>(@"SELECT COUNT(*)
|
||||
|
||||
Reference in New Issue
Block a user