public static void WebOp(string webUrl, Action<SPWeb> op)
{
SiteOp(webUrl, site =>
{
using (SPWeb web = site.OpenWeb())
{
bool auuOrig = false;
try
{
auuOrig = web.AllowUnsafeUpdates;
web.AllowUnsafeUpdates = true;
op(web);
}
catch (Exception ex)
{
DiagnosticLog.Error(op.Method.Name, ex +
(ex.InnerException != null ? "::" + ex.InnerException : string.Empty));
throw;
}
finally
{
web.AllowUnsafeUpdates = auuOrig;
}
}
});
}