private void DisableContentApproval(SPWeb web)
{
    SPList pagesLibrary = web.GetList("Pages");

    if (pagesLibrary != null)
    {
        pagesLibrary.EnableModeration = false;
        pagesLibrary.Update();
    }

    foreach (SPWeb subWeb in web.Webs)
    {
        DisableContentApproval(subWeb);
    }
}

Posted by Chris Buchanan

Leave a reply

Your email address will not be published. Required fields are marked *