SPWeb themes and Icons

here's my small code snippet that enables an administrator to change the theme and the icon of an entire sitecollection at once.

here it is:
public enum SPSiteThemes {
none,
classic,
simple,
Belltown,
Breeze2,
Cardinal,
Citrus,
Granite,
Jet,
Lacquer,
Lichen,
Obsidian,
Petal,
Plastic,
Reflector,
Verdant,
Vintage,
Wheat
}

private void ApplyThemeToWeb(SPSiteThemes Theme, SPWeb Web, bool Recurse)
{
Web.ApplyTheme(Theme.ToString());
if (Recurse) {
foreach (SPWeb subweb in Web.Webs) {
try
{
ApplyThemeToWeb(Theme, subweb, Recurse);
}
finally {
subweb.Dispose();
}
}
}
Web.Update();
}

private void ApplyIconToWeb(string IconURL, SPWeb Web, bool Recurse)
{
Web.SiteLogoUrl = IconURL;
Console.WriteLine(Web.Title + " updated to " + IconURL.ToString());
if (Recurse)
{
foreach (SPWeb subweb in Web.Webs)
{
try
{
ApplyIconToWeb(IconURL, subweb, Recurse);
}
finally
{
subweb.Dispose();
}
}
}
Web.Update();
}

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)