July 2008
M T W T F S S
« May   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Archive for July, 2008

18
Jul

Checking moderation status of a page in Share Point

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;
}