I ran into a problem recently where some pages on a site were rejected without my knowing it. I needed a quick fix to go and locate all those pages. Here is my answer:
As you crawl through a site by list or by PublishingSite, send the SPListItem into this. It will tell you if it is denied.
private static bool moderationPendingFix(SPListItem curItem)
{
if (curItem.ParentList.EnableModeration == true)
{
SPModerationInformation moderationInformation = curItem.ModerationInformation;
if (moderationInformation.Status != SPModerationStatusType.Denied)
return true;
else
return false;
}
else
return true;
}


0 Responses to “Checking moderation status of a page in Share Point”
Leave a Reply