Skip to content

Commit

Permalink
Fixed bug where contenttypedenpendecy features were ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
tarjeieo committed Sep 17, 2014
1 parent ba3d836 commit 988b294
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Sherpa.Library/SiteHierarchy/FeatureManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,30 @@ public void ActivateFeatures(ClientContext clientContext, Web webToConfigure, Li
{
if (siteFeatures != null)
{
foreach (var featureActivation in siteFeatures.Where(f => f.ContentTypeDependency == onlyContentTypeDependencyFeatures))
foreach (var featureActivation in siteFeatures)
{
ActivateSiteCollectionFeature(clientContext, featureActivation);
if (onlyContentTypeDependencyFeatures && featureActivation.ContentTypeDependency)
{
ActivateSiteCollectionFeature(clientContext, featureActivation);
}
else if (!onlyContentTypeDependencyFeatures)
{
ActivateSiteCollectionFeature(clientContext, featureActivation);
}
}
}
if (webFeatures != null)
{
foreach (var featureActivation in webFeatures.Where(f => f.ContentTypeDependency == onlyContentTypeDependencyFeatures))
foreach (var featureActivation in webFeatures)
{
ActivateWebFeature(clientContext, featureActivation, webToConfigure);
if (onlyContentTypeDependencyFeatures && featureActivation.ContentTypeDependency)
{
ActivateWebFeature(clientContext, featureActivation, webToConfigure);
}
else if (!onlyContentTypeDependencyFeatures)
{
ActivateWebFeature(clientContext, featureActivation, webToConfigure);
}
}
}
}
Expand Down

0 comments on commit 988b294

Please sign in to comment.