diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj index 06b264c92..6781b1839 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj +++ b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj @@ -18,6 +18,7 @@ 3.5 + false true @@ -43,25 +44,33 @@ False ..\..\..\lib\autofac\Autofac.dll + True ..\..\..\lib\autofac\Autofac.Integration.Web.dll + True ..\..\..\lib\autofac\Autofac.Integration.Web.Mvc.dll + True False ..\..\..\lib\aspnetmvc\Microsoft.Web.Infrastructure.dll True - + + True + False - + + True + ..\..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll + True False @@ -172,151 +181,188 @@ {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core + True {D5D447D7-EF8E-43A6-B9A4-3B025DD9F45D} Lucene + True {1C981BB3-26F7-494C-9005-CC27A5144233} Orchard.ArchiveLater + True {63FBD4D9-E1DA-4A7B-AA6A-D6074FE50867} Orchard.Blogs + True {C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962} Orchard.CodeGeneration + True {14C049FD-B35B-415A-A824-87F26B26E7FD} Orchard.Comments + True {0E7646E8-FE8F-43C1-8799-D97860925EC4} Orchard.ContentTypes + True {4A4595EF-6C37-4F99-96ED-4AE0B9E438D3} Orchard.DesignerTools + True {05660F47-D649-48BD-9DED-DF4E01E7CFF9} Orchard.Email + True {AB3C207C-0126-4143-8D62-1119DF80D366} Orchard.Experimental + True {EA2B9121-EF54-40A6-A53E-6593C86EE696} Orchard.Indexing + True {8F116B06-1C0E-4E4C-9A0A-D2FAB851E768} Orchard.jQuery + True {137906EA-15FE-4AD8-A6A0-27528F0477D6} Orchard.Lists + True {FBC8B571-ED50-49D8-8D9D-64AB7454A0D6} Orchard.Localization + True {43D0EC0B-1955-4566-8D31-7B9102DA1703} Orchard.MediaPicker + True {D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} Orchard.Media + True {085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC} Orchard.Messaging + True {EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1} Orchard.Migrations + True {17F86780-9A1F-4AA1-86F1-875EEC2730C7} Orchard.Modules + True {72457126-E118-4171-A08F-9A709EE4B7FC} Orchard.MultiTenancy + True {DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059} Orchard.Packaging + True {3420C92A-747F-4990-BA08-F2C9531E44AD} Orchard.Pages + True {C889167C-E52C-4A65-A419-224B3D1B957D} Orchard.PublishLater + True {FC1D74E8-7A4D-48F4-83DE-95C6173780C4} Orchard.Recipes + True {D10AD48F-407D-4DB5-A328-173EC7CB010F} Orchard.Roles + True {2AD6973D-C7BB-416E-89FE-EEE34664E05F} Orchard.Scripting.Dlr + True {2AD6973D-C7BB-416E-89FE-EEE34664E05F} Orchard.Scripting + True {4BE4EB01-AC56-4048-924E-2CA77F509ABA} Orchard.Search + True {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} Orchard.Setup + True {5D0F00F0-26C9-4785-AD61-B85710C60EB0} Orchard.Tags + True {CDE24A24-01D3-403C-84B9-37722E18DFB7} Orchard.Themes + True {79AED36E-ABD0-4747-93D3-8722B042454B} Orchard.Users + True {194D3CCC-1153-474D-8176-FDE8D7D0D0BD} Orchard.Widgets + True {954CA994-D204-468B-9D69-51F6AD3E1C29} TinyMce + True {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework False + True {33B1BC8D-E292-4972-A363-22056B207156} Orchard + True {2505AA84-65A6-43D0-9C27-4F44FD576284} Orchard.Azure + True diff --git a/src/Orchard.Azure/Orchard.Azure.csproj b/src/Orchard.Azure/Orchard.Azure.csproj index 01dd0d140..94e9b6ddf 100644 --- a/src/Orchard.Azure/Orchard.Azure.csproj +++ b/src/Orchard.Azure/Orchard.Azure.csproj @@ -54,7 +54,9 @@ - + + True + 3.5 @@ -81,6 +83,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework + True diff --git a/src/Orchard.Specs/Setup.feature b/src/Orchard.Specs/Setup.feature index 6c558aa29..e695fce9a 100644 --- a/src/Orchard.Specs/Setup.feature +++ b/src/Orchard.Specs/Setup.feature @@ -7,7 +7,7 @@ Scenario: Root request shows setup form Given I have a clean site with | extension | names | | Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Messaging, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.jQuery, TinyMce | - | Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | + | Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | | Theme | SafeMode | When I go to "/" Then I should see "Welcome to Orchard" @@ -18,7 +18,7 @@ Scenario: Setup folder also shows setup form Given I have a clean site with | extension | names | | Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Messaging, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.jQuery, TinyMce | - | Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | + | Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | | Theme | SafeMode | When I go to "/Setup" Then I should see "Welcome to Orchard" @@ -29,7 +29,7 @@ Scenario: Some of the initial form values are required Given I have a clean site with | extension | names | | Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Messaging, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.jQuery, TinyMce | - | Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | + | Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | | Theme | SafeMode | When I go to "/Setup" And I hit "Finish Setup" @@ -39,8 +39,8 @@ Scenario: Some of the initial form values are required Scenario: Calling setup on a brand new install Given I have a clean site with | extension | names | - | Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes | - | Core | Common, Containers, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | + | Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup | + | Core | Common, Containers, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc | | Theme | SafeMode, TheThemeMachine | And I am on "/Setup" When I fill in diff --git a/src/Orchard.Specs/Setup.feature.cs b/src/Orchard.Specs/Setup.feature.cs index ec722a6be..418479e8c 100644 --- a/src/Orchard.Specs/Setup.feature.cs +++ b/src/Orchard.Specs/Setup.feature.cs @@ -2,7 +2,7 @@ // // This code was generated by SpecFlow (http://www.specflow.org/). // SpecFlow Version:1.5.0.0 -// Runtime Version:4.0.30319.1 +// Runtime Version:4.0.30319.225 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -176,7 +176,7 @@ this.ScenarioSetup(scenarioInfo); "names"}); table4.AddRow(new string[] { "Module", - @"Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes"}); + @"Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup"}); table4.AddRow(new string[] { "Core", "Common, Containers, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, S" + diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index 027136699..dd6a1485d 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -43,6 +43,7 @@ False ..\..\..\lib\claysharp\ClaySharp.dll + True @@ -53,10 +54,12 @@ False ..\..\..\lib\aspnetmvc\System.Web.Mvc.dll + True False ..\..\..\lib\aspnetmvc\System.Web.WebPages.dll + True @@ -208,7 +211,6 @@ - @@ -320,6 +322,7 @@ {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} Orchard.Framework + True diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj.rej b/src/Orchard.Web/Core/Orchard.Core.csproj.rej deleted file mode 100644 index 6e53a6bbe..000000000 --- a/src/Orchard.Web/Core/Orchard.Core.csproj.rej +++ /dev/null @@ -1,18 +0,0 @@ ---- Orchard.Core.csproj -+++ Orchard.Core.csproj -@@ -18,6 +18,7 @@ - 3.5 - - -+ false - - - true -@@ -200,6 +201,7 @@ - - - -+ - - - diff --git a/src/Orchard.Web/Core/Settings/Handlers/SiteSettingsPartHandler.cs b/src/Orchard.Web/Core/Settings/Handlers/SiteSettingsPartHandler.cs index 80a2256f8..52707ff5e 100644 --- a/src/Orchard.Web/Core/Settings/Handlers/SiteSettingsPartHandler.cs +++ b/src/Orchard.Web/Core/Settings/Handlers/SiteSettingsPartHandler.cs @@ -1,5 +1,4 @@ -using System; -using JetBrains.Annotations; +using JetBrains.Annotations; using Orchard.Core.Settings.Models; using Orchard.Data; using Orchard.ContentManagement.Handlers; @@ -12,14 +11,6 @@ namespace Orchard.Core.Settings.Handlers { Filters.Add(new ActivatingFilter("Site")); Filters.Add(StorageFilter.For(repository)); Filters.Add(StorageFilter.For(repository2)); - - OnInitializing(InitializeSiteSettings); - } - - private static void InitializeSiteSettings(InitializingContentContext initializingContentContext, SiteSettingsPart siteSettingsPart) { - siteSettingsPart.Record.SiteSalt = Guid.NewGuid().ToString("N"); - siteSettingsPart.Record.SiteName = "My Orchard Project Application"; - siteSettingsPart.Record.PageTitleSeparator = " - "; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Core/Settings/Models/SiteSettingsCache.cs b/src/Orchard.Web/Core/Settings/Models/SiteSettingsCache.cs deleted file mode 100644 index b09a11ec4..000000000 --- a/src/Orchard.Web/Core/Settings/Models/SiteSettingsCache.cs +++ /dev/null @@ -1,141 +0,0 @@ -using Orchard.ContentManagement; -using Orchard.Settings; - -namespace Orchard.Core.Settings.Models { - public class SiteSettingsCache : ISite { - private readonly int _id; - - private SiteSettingsPart _siteSettingsPart; - - private string _pageTitleSeparator; - private string _siteName; - private string _siteSalt; - private string _superUser; - private string _homePage; - private string _siteCulture; - private ResourceDebugMode _resourceDebugMode; - private int _pageSize; - private string _baseUrl; - - public SiteSettingsCache(ISite site) { - _id = site.Id; - _pageTitleSeparator = site.PageTitleSeparator; - _siteName = site.SiteName; - _siteSalt = site.SiteSalt; - _superUser = site.SuperUser; - _homePage = site.HomePage; - _siteCulture = site.SiteCulture; - _resourceDebugMode = site.ResourceDebugMode; - _pageSize = site.PageSize; - _baseUrl = site.BaseUrl; - } - - public int Id { - get { return _id; } - } - - public string PageTitleSeparator { - get { return _pageTitleSeparator; } - - set { - _pageTitleSeparator = value; - SiteSettingsPart.PageTitleSeparator = value; - } - } - - public string SiteName { - get { return _siteName; } - - set { - _siteName = value; - SiteSettingsPart.SiteName = value; - } - } - - public string SiteSalt { - get { return _siteSalt; } - - set { - _siteSalt = value; - SiteSettingsPart.Record.SiteSalt = value; - } - } - - public string SuperUser { - get { return _superUser; } - - set { - _superUser = value; - SiteSettingsPart.SuperUser = value; - } - } - - public string HomePage { - get { return _homePage; } - - set { - _homePage = value; - SiteSettingsPart.HomePage = value; - } - } - - public string SiteCulture { - get { return _siteCulture; } - - set { - _siteCulture = value; - SiteSettingsPart.SiteCulture = value; - } - } - - public ResourceDebugMode ResourceDebugMode { - get { return _resourceDebugMode; } - - set { - _resourceDebugMode = value; - SiteSettingsPart.ResourceDebugMode = value; - } - } - - public int PageSize { - get { return _pageSize; } - - set { - _pageSize = value; - SiteSettingsPart.PageSize = value; - } - } - - public string BaseUrl { - get { return _baseUrl; } - - set { - _baseUrl = value; - SiteSettingsPart.BaseUrl = value; - } - } - - public ContentItem ContentItem { - get { return SiteSettingsPart.ContentItem; } - } - - private ISiteService SiteService { get; set; } - - private SiteSettingsPart SiteSettingsPart { - get { - if (_siteSettingsPart == null) { - _siteSettingsPart = SiteService.GetSiteSettingsPart() as SiteSettingsPart; - } - - return _siteSettingsPart; - } - - set { _siteSettingsPart = value; } - } - - public void ResetCache(ISiteService siteService) { - SiteService = siteService; - SiteSettingsPart = null; - } - } -} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Settings/Services/SiteService.cs b/src/Orchard.Web/Core/Settings/Services/SiteService.cs index 1a697618f..e9a9f140f 100644 --- a/src/Orchard.Web/Core/Settings/Services/SiteService.cs +++ b/src/Orchard.Web/Core/Settings/Services/SiteService.cs @@ -20,27 +20,23 @@ namespace Orchard.Core.Settings.Services { ICacheManager cacheManager) { _contentManager = contentManager; _cacheManager = cacheManager; - Logger = NullLogger.Instance; } public ILogger Logger { get; set; } public ISite GetSiteSettings() { - SiteSettingsCache siteSettingsCache = _cacheManager.Get("SiteSettings", - ctx => new SiteSettingsCache(GetSiteSettingsPart())); - siteSettingsCache.ResetCache(this); - return siteSettingsCache; - } - - public ISite GetSiteSettingsPart() { var siteId = _cacheManager.Get("SiteId", ctx => { var site = _contentManager.Query("Site") .Slice(0, 1) .FirstOrDefault(); if (site == null) { - site = _contentManager.Create("Site").ContentItem; + site = _contentManager.Create("Site", item => { + item.Record.SiteSalt = Guid.NewGuid().ToString("N"); + item.Record.SiteName = "My Orchard Project Application"; + item.Record.PageTitleSeparator = " - "; + }).ContentItem; } return site.Id; diff --git a/src/Orchard.Web/Modules/Lucene/Lucene.csproj b/src/Orchard.Web/Modules/Lucene/Lucene.csproj index 6a6e8ed4c..1a12990ae 100644 --- a/src/Orchard.Web/Modules/Lucene/Lucene.csproj +++ b/src/Orchard.Web/Modules/Lucene/Lucene.csproj @@ -14,6 +14,7 @@ Lucene v4.0 false + false true @@ -36,6 +37,7 @@ ..\..\..\..\lib\lucene.net\Lucene.Net.dll + True diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj b/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj index 855506f29..56ca5d211 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj +++ b/src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj @@ -18,6 +18,7 @@ 3.5 + false true @@ -42,6 +43,7 @@ False ..\..\..\..\lib\joel.net.akismet\Joel.Net.Akismet.dll + True diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj b/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj index b448d7a46..16a517238 100644 --- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj +++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj @@ -42,6 +42,7 @@ ..\..\..\..\lib\claysharp\ClaySharp.dll + True diff --git a/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj b/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj index f9987a895..55c8dd9fc 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj +++ b/src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj @@ -18,6 +18,7 @@ 3.5 + false true @@ -42,6 +43,7 @@ False ..\..\..\..\lib\sharpziplib\ICSharpCode.SharpZipLib.dll + True diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs index d7fe75d67..3193c72d1 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryController.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Expressions; using System.Web.Mvc; using System.Web.Routing; using System.Xml.Linq; @@ -10,6 +11,7 @@ using Orchard.Environment.Extensions.Models; using Orchard.Localization; using Orchard.Packaging.Events; using Orchard.Packaging.Extensions; +using Orchard.Packaging.GalleryServer; using Orchard.Packaging.Models; using Orchard.Packaging.Services; using Orchard.Packaging.ViewModels; @@ -151,16 +153,17 @@ namespace Orchard.Packaging.Controllers { int totalCount = 0; foreach (var source in sources) { try { + Expression> packagesCriteria = p => p.PackageType == packageType && + p.IsLatestVersion && + (string.IsNullOrEmpty(options.SearchText) + || p.Title.Contains(options.SearchText) + || p.Description.Contains(options.SearchText) + || p.Tags.Contains(options.SearchText)); + var sourceExtensions = _packagingSourceManager.GetExtensionList(true, source, packages => { - packages = packages.Where(p => p.PackageType == packageType && - p.IsLatestVersion && - (string.IsNullOrEmpty(options.SearchText) - || p.Title.Contains(options.SearchText) - || p.Description.Contains(options.SearchText) - || p.Tags.Contains(options.SearchText) - )); + packages = packages.Where(packagesCriteria); switch (options.Order) { case PackagingExtensionsOrder.Downloads: @@ -174,8 +177,8 @@ namespace Orchard.Packaging.Controllers { break; } - if(pager.PageSize != 0) { - packages = packages.Skip((pager.Page - 1)*pager.PageSize).Take(pager.PageSize); + if (pager.PageSize != 0) { + packages = packages.Skip((pager.Page - 1) * pager.PageSize).Take(pager.PageSize); } return packages; @@ -184,10 +187,7 @@ namespace Orchard.Packaging.Controllers { // count packages separately to prevent loading everything just to count totalCount += _packagingSourceManager.GetExtensionCount( source, - packages => packages.Where(p => p.PackageType == packageType && - p.IsLatestVersion && - (string.IsNullOrEmpty(options.SearchText) || p.Title.Contains(options.SearchText))) - ); + packages => packages.Where(packagesCriteria)); extensions = extensions == null ? sourceExtensions : extensions.Concat(sourceExtensions); diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj b/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj index 6ff52628b..4e6d95cc0 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj @@ -14,6 +14,7 @@ Orchard.Packaging v4.0 false + false true @@ -38,6 +39,7 @@ False ..\..\..\..\lib\nuget\NuGet.Core.dll + True diff --git a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj index 22e5fdd35..94a4e0bac 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj +++ b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Orchard.Scripting.Dlr.csproj @@ -14,6 +14,7 @@ Orchard.Scripting.Dlr v4.0 false + false true @@ -37,19 +38,23 @@ False ..\..\..\..\lib\dlr\IronRuby.dll + True False ..\..\..\..\lib\dlr\IronRuby.Libraries.dll + True False ..\..\..\..\lib\dlr\Microsoft.Dynamic.dll + True False ..\..\..\..\lib\dlr\Microsoft.Scripting.dll + True diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml b/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml index 7ce6a5c02..0353dcfd1 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml +++ b/src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml @@ -8,7 +8,7 @@ blog 1.0 - + - + @@ -53,5 +53,6 @@ widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true site setting set baseurl + theme activate "The Theme Machine" diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Recipes/default.recipe.xml b/src/Orchard.Web/Modules/Orchard.Setup/Recipes/default.recipe.xml index 870490142..15629f964 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Recipes/default.recipe.xml +++ b/src/Orchard.Web/Modules/Orchard.Setup/Recipes/default.recipe.xml @@ -8,14 +8,14 @@ 1.0 - + - + @@ -49,5 +49,6 @@ widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true site setting set baseurl + theme activate "The Theme Machine" diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs index 628ce21b8..15d7277e0 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs @@ -7,13 +7,15 @@ using Orchard.ContentManagement; using Orchard.Core.Settings.Descriptor.Records; using Orchard.Core.Settings.Models; using Orchard.Data; +using Orchard.Data.Migration; using Orchard.Data.Migration.Interpreters; using Orchard.Data.Migration.Schema; using Orchard.Environment; using Orchard.Environment.Configuration; -using Orchard.Environment.ShellBuilders; using Orchard.Environment.Descriptor; using Orchard.Environment.Descriptor.Models; +using Orchard.Environment.ShellBuilders; +using Orchard.Environment.State; using Orchard.Localization; using Orchard.Localization.Services; using Orchard.Recipes.Models; @@ -21,9 +23,6 @@ using Orchard.Recipes.Services; using Orchard.Reports.Services; using Orchard.Security; using Orchard.Settings; -using Orchard.Environment.State; -using Orchard.Data.Migration; -using Orchard.Themes.Services; using Orchard.Utility.Extensions; namespace Orchard.Setup.Services { @@ -172,6 +171,7 @@ namespace Orchard.Setup.Services { private string CreateTenantData(SetupContext context, IWorkContextScope environment) { string executionId = null; + // create superuser var membershipService = environment.Resolve(); var user = @@ -191,10 +191,6 @@ namespace Orchard.Setup.Services { siteSettings.Record.SuperUser = context.AdminUsername; siteSettings.Record.SiteCulture = "en-US"; - // set site theme - var themeService = environment.Resolve(); - themeService.SetSiteTheme("TheThemeMachine"); - // add default culture var cultureManager = environment.Resolve(); cultureManager.AddCulture("en-US"); @@ -202,7 +198,7 @@ namespace Orchard.Setup.Services { var recipeManager = environment.Resolve(); executionId = recipeManager.Execute(Recipes().Where(r => r.Name.Equals(context.Recipe, StringComparison.OrdinalIgnoreCase)).FirstOrDefault()); - //null check: temporary fix for running setup in command line + // null check: temporary fix for running setup in command line if (HttpContext.Current != null) { authenticationService.SignIn(user, true); } diff --git a/src/Orchard.Web/Modules/Orchard.Setup/SetupMode.cs b/src/Orchard.Web/Modules/Orchard.Setup/SetupMode.cs index af3c32067..50ddb32f6 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/SetupMode.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/SetupMode.cs @@ -140,10 +140,6 @@ namespace Orchard.Setup { return site.As(); } - - public ISite GetSiteSettingsPart() { - return GetSiteSettings(); - } } class SafeModeSite : ContentPart, ISite { diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs index 5d39bb074..9e93f78e7 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs @@ -69,7 +69,13 @@ namespace Orchard.Themes.Controllers { bool installThemes = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null; var featuresThatNeedUpdate = _dataMigrationManager.GetFeaturesThatNeedUpdate(); - ThemeEntry currentTheme = new ThemeEntry(_siteThemeService.GetSiteTheme()); + + ThemeEntry currentTheme = null; + ExtensionDescriptor currentThemeDescriptor = _siteThemeService.GetSiteTheme(); + if (currentThemeDescriptor != null) { + currentTheme = new ThemeEntry(currentThemeDescriptor); + } + IEnumerable themes = _extensionManager.AvailableExtensions() .Where(extensionDescriptor => { bool hidden = false; @@ -80,7 +86,8 @@ namespace Orchard.Themes.Controllers { return !hidden && DefaultExtensionTypes.IsTheme(extensionDescriptor.ExtensionType) && - !currentTheme.Descriptor.Id.Equals(extensionDescriptor.Id); + (currentTheme == null || + !currentTheme.Descriptor.Id.Equals(extensionDescriptor.Id)); }) .Select(extensionDescriptor => { ThemeEntry themeEntry = new ThemeEntry(extensionDescriptor) { diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs index 89b6d2c95..e350f92bb 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Controllers/AdminController.cs @@ -61,8 +61,11 @@ namespace Orchard.Warmup.Controllers { using (var urlReader = new StringReader(viewModel.Settings.Urls)) { string relativeUrl; while (null != (relativeUrl = urlReader.ReadLine())) { + if(String.IsNullOrWhiteSpace(relativeUrl)) { + continue; + } if (!Uri.IsWellFormedUriString(relativeUrl, UriKind.Relative) || !(relativeUrl.StartsWith("/"))) { - AddModelError("Urls", T("{0} is an invalid warmup url.", relativeUrl)); + AddModelError("Urls", T("\"{0}\" is an invalid warmup url.", relativeUrl)); } } } @@ -75,14 +78,15 @@ namespace Orchard.Warmup.Controllers { } } - if (ModelState.IsValid) { - Services.Notifier.Information(T("Warmup updated successfully.")); - } if (ModelState.IsValid) { _warmupUpdater.Generate(); + Services.Notifier.Information(T("Warmup updated successfully.")); + } + else { + Services.TransactionManager.Cancel(); } - return RedirectToAction("Index"); + return Index(); } bool IUpdateModel.TryUpdateModel(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) { diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Services/WarmupUpdater.cs b/src/Orchard.Web/Modules/Orchard.Warmup/Services/WarmupUpdater.cs index 486abe97e..3f69106e4 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Services/WarmupUpdater.cs +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Services/WarmupUpdater.cs @@ -117,6 +117,10 @@ namespace Orchard.Warmup.Services { using (var urlReader = new StringReader(part.Urls)) { string relativeUrl; while (null != (relativeUrl = urlReader.ReadLine())) { + if (String.IsNullOrWhiteSpace(relativeUrl)) { + continue; + } + string url = null; relativeUrl = relativeUrl.Trim(); diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.Warmup/Views/Admin/Index.cshtml index 9b6c8d2f9..6ee7fb7ea 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Views/Admin/Index.cshtml @@ -7,14 +7,16 @@ Layout.Title = T("Performance").ToString(); } -

The urls below will be requested using @Html.Link(WorkContext.CurrentSite.BaseUrl, WorkContext.CurrentSite.BaseUrl) as a base url. You can change it on the @Html.ActionLink(T("General Settings page").Text, "Index", new { controller = "Admin", area = "Settings" }).

@using (Html.BeginFormAntiForgeryPost()) { @Html.ValidationSummary() + +

@T("The paths below will be requested using {0} as a base url. You can change the base url on the {1}. ", @Html.Link(WorkContext.CurrentSite.BaseUrl, WorkContext.CurrentSite.BaseUrl), @Html.ActionLink(T("General Settings page").Text, "Index", new { controller = "Admin", area = "Settings" }))

+
@Html.TextAreaFor(m => m.Settings.Urls, new { @class = "textMedium" }) - @T("This must be a set of relative paths, e.g., /, /About") + @T("This must be a set of relative paths, e.g., /, /About. Please ensure that you enter only one path per line.")
@@ -33,13 +35,10 @@
-
- -
-} + if (Model.ReportEntries.Any()) {
- +

@T("Status")

@@ -49,9 +48,9 @@ - + - + @@ -70,3 +69,8 @@ }
@T("Url")@T("Path") @T("Status")@T("Date")@T("Date generated")
+ } +
+ +
+} diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt b/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt index 9a42deb1a..24668c265 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt @@ -12,6 +12,5 @@ Features: Orchard.Widgets.PageLayerHinting: Name: Page Layer Hinting Description: Adds a notification after creating a new Page with a direct link to create a Widget Layer for that specific page by URL. - Dependencies: Orchard.Widgets + Dependencies: Orchard.Widgets, Routable Category: Widget - Priority: -1 diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/ResourceManifest.cs b/src/Orchard.Web/Modules/Orchard.jQuery/ResourceManifest.cs index 5cdf1a755..3ba4ad362 100644 --- a/src/Orchard.Web/Modules/Orchard.jQuery/ResourceManifest.cs +++ b/src/Orchard.Web/Modules/Orchard.jQuery/ResourceManifest.cs @@ -30,7 +30,7 @@ namespace Orchard.jQuery { manifest.DefineScript("jQueryUI_Progressbar").SetUrl("jquery.ui.progressbar.min.js", "jquery.ui.progressbar.js").SetVersion("1.8.10").SetDependencies("jQueryUI_Core", "jQueryUI_Widget"); // Effects - manifest.DefineScript("jQueryEffects_Core").SetUrl("jquery.effects.core.min.js", "jquery.effects.core.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core"); + manifest.DefineScript("jQueryEffects_Core").SetUrl("jquery.effects.core.min.js", "jquery.effects.core.js").SetVersion("1.8.10").SetDependencies("jQuery"); manifest.DefineScript("jQueryEffects_Blind").SetUrl("jquery.effects.blind.min.js", "jquery.effects.blind.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core"); manifest.DefineScript("jQueryEffects_Bounce").SetUrl("jquery.effects.bounce.min.js", "jquery.effects.bounce.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core"); manifest.DefineScript("jQueryEffects_Clip").SetUrl("jquery.effects.clip.min.js", "jquery.effects.clip.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core"); diff --git a/src/Orchard.Web/Themes/SafeMode/Views/Layout.cshtml b/src/Orchard.Web/Themes/SafeMode/Views/Layout.cshtml index 5d37c838c..7e73a7a1d 100644 --- a/src/Orchard.Web/Themes/SafeMode/Views/Layout.cshtml +++ b/src/Orchard.Web/Themes/SafeMode/Views/Layout.cshtml @@ -3,13 +3,37 @@ Script.Require("ShapesBase"); Style.Include("site.css"); RegisterLink(new LinkEntry { Condition = "lte IE 6", Rel = "stylesheet", Type="text/css", Href = Href("../Styles/ie6.css")}.AddAttribute("media", "screen, projection")); + + if (!string.IsNullOrEmpty(WorkContext.CurrentSite.SuperUser)) { + WorkContext.Layout.Footer.Add(New.User(), "10"); // Login and dashboard links + } } -@Display(Model.Messages) + +@if (Model.Navigation != null) { +
+ @Display(Model.Navigation) +
+} + +@if (Model.Messages != null) { +
+ @Display(Model.Messages) +
+} +
-@Display(Model.Content) -
\ No newline at end of file +@if (Model.Content != null) { + @Display(Model.Content) +} + + +@if (Model.Footer != null) { + +} \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheAdmin/Views/Pager.cshtml b/src/Orchard.Web/Themes/TheAdmin/Views/Pager.cshtml index 50b0cfd58..600b6e05f 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Views/Pager.cshtml +++ b/src/Orchard.Web/Themes/TheAdmin/Views/Pager.cshtml @@ -24,7 +24,10 @@ Model.Classes.Add("pager"); Model.Classes.Add("group"); - var tag = Tag(Model, "ul"); + var pageTag = Tag(Model, "ul"); + + Model.Classes.Add("selector"); + var pageSizeTag = Tag(Model, "ul"); if (Model.RouteData != null) { foreach (var rd in Model.RouteData.Values) { @@ -40,109 +43,134 @@ } @if (Model.TotalItemCount > 1) { - using (Html.BeginFormAntiForgeryPost()) { - } -@using(Script.Foot()) { +@using (Script.Foot()) { diff --git a/src/Orchard.Web/Web.config b/src/Orchard.Web/Web.config index c337ae4ce..e89891961 100644 --- a/src/Orchard.Web/Web.config +++ b/src/Orchard.Web/Web.config @@ -63,8 +63,6 @@ - - diff --git a/src/Orchard/Environment/Extensions/ExtensionLoaderCoordinator.cs b/src/Orchard/Environment/Extensions/ExtensionLoaderCoordinator.cs index ad1c42f8b..298e9d5b3 100644 --- a/src/Orchard/Environment/Extensions/ExtensionLoaderCoordinator.cs +++ b/src/Orchard/Environment/Extensions/ExtensionLoaderCoordinator.cs @@ -247,7 +247,20 @@ namespace Orchard.Environment.Extensions { } private IEnumerable SortExtensionProbeEntries(IEnumerable entries, ConcurrentDictionary virtualPathModficationDates) { - return entries + // All "entries" are for the same extension ID, so we just need to filter/sort them by priority+ modification dates. + var groupByPriority = entries + .GroupBy(entry => entry.Priority) + .OrderByDescending(g => g.Key); + + // Select highest priority group with at least one item + var firstNonEmptyGroup = groupByPriority.FirstOrDefault(g => g.Count() >= 1) ?? Enumerable.Empty(); + + // No need for further sorting if only 1 item found + if (firstNonEmptyGroup.Count() <= 1) + return firstNonEmptyGroup; + + // Sort by last modification date/loader order + return firstNonEmptyGroup .OrderByDescending(probe => GetVirtualPathDepedenciesModificationTimeUtc(virtualPathModficationDates, probe)) .ThenBy(probe => probe.Loader.Order) .ToList(); diff --git a/src/Orchard/Environment/Extensions/Loaders/CoreExtensionLoader.cs b/src/Orchard/Environment/Extensions/Loaders/CoreExtensionLoader.cs index 9e6621ddb..f30b9b351 100644 --- a/src/Orchard/Environment/Extensions/Loaders/CoreExtensionLoader.cs +++ b/src/Orchard/Environment/Extensions/Loaders/CoreExtensionLoader.cs @@ -32,6 +32,7 @@ namespace Orchard.Environment.Extensions.Loaders { return new ExtensionProbeEntry { Descriptor = descriptor, Loader = this, + Priority = 100, // Higher priority because assemblies in ~/bin always take precedence VirtualPath = "~/Core/" + descriptor.Id, VirtualPathDependencies = Enumerable.Empty(), }; diff --git a/src/Orchard/Environment/Extensions/Loaders/IExtensionLoader.cs b/src/Orchard/Environment/Extensions/Loaders/IExtensionLoader.cs index eb904148a..d3890d616 100644 --- a/src/Orchard/Environment/Extensions/Loaders/IExtensionLoader.cs +++ b/src/Orchard/Environment/Extensions/Loaders/IExtensionLoader.cs @@ -9,6 +9,7 @@ namespace Orchard.Environment.Extensions.Loaders { public class ExtensionProbeEntry { public ExtensionDescriptor Descriptor { get; set; } public IExtensionLoader Loader { get; set; } + public int Priority { get; set; } public string VirtualPath { get; set; } public IEnumerable VirtualPathDependencies { get; set; } } diff --git a/src/Orchard/Environment/Extensions/Loaders/ReferencedExtensionLoader.cs b/src/Orchard/Environment/Extensions/Loaders/ReferencedExtensionLoader.cs index 9bee57fd7..c3d4581b1 100644 --- a/src/Orchard/Environment/Extensions/Loaders/ReferencedExtensionLoader.cs +++ b/src/Orchard/Environment/Extensions/Loaders/ReferencedExtensionLoader.cs @@ -1,4 +1,5 @@ -using System.IO; +using System.Collections.Generic; +using System.IO; using System.Linq; using Orchard.Environment.Extensions.Models; using Orchard.FileSystems.Dependencies; @@ -59,6 +60,7 @@ namespace Orchard.Environment.Extensions.Loaders { return new ExtensionProbeEntry { Descriptor = descriptor, Loader = this, + Priority = 100, // Higher priority because assemblies in ~/bin always take precedence VirtualPath = assemblyPath, VirtualPathDependencies = new[] { assemblyPath }, }; diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index 4c317f8a5..0989db416 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -56,41 +56,51 @@ False ..\..\lib\autofac\Autofac.dll + True False ..\..\lib\autofac\Autofac.Configuration.dll + True False ..\..\lib\autofac\Autofac.Integration.Web.dll + True False ..\..\lib\autofac\Autofac.Integration.Web.Mvc.dll + True False ..\..\lib\Castle Windsor 2.0\bin\Castle.Core.dll + True False ..\..\lib\Castle Windsor 2.0\bin\Castle.DynamicProxy2.dll + True ..\..\lib\Castle Windsor 2.0\bin\Castle.Services.Logging.Log4netIntegration.dll + True False ..\..\lib\claysharp\ClaySharp.dll + True False ..\..\lib\fluentnhibernate\FluentNHibernate.dll + True False ..\..\lib\fluentnhibernate\log4net.dll + True @@ -99,10 +109,12 @@ False ..\..\lib\fluentnhibernate\NHibernate.dll + True False ..\..\lib\linqnhibernate\NHibernate.Linq.dll + True diff --git a/src/Orchard/Settings/ISiteService.cs b/src/Orchard/Settings/ISiteService.cs index e67d58ef0..cdd2c4888 100644 --- a/src/Orchard/Settings/ISiteService.cs +++ b/src/Orchard/Settings/ISiteService.cs @@ -1,6 +1,5 @@ namespace Orchard.Settings { public interface ISiteService : IDependency { ISite GetSiteSettings(); - ISite GetSiteSettingsPart(); } } diff --git a/src/Tools/Orchard/HostContext/CommandHostContextProvider.cs b/src/Tools/Orchard/HostContext/CommandHostContextProvider.cs index 082bc3c84..12505b9db 100644 --- a/src/Tools/Orchard/HostContext/CommandHostContextProvider.cs +++ b/src/Tools/Orchard/HostContext/CommandHostContextProvider.cs @@ -113,7 +113,12 @@ namespace Orchard.HostContext { } private static CommandHost CreateWorkerAppDomainWithHost(string virtualPath, string physicalPath, Type hostType) { - ClientBuildManager clientBuildManager = new ClientBuildManager(virtualPath, physicalPath); + var clientBuildManager = new ClientBuildManager(virtualPath, physicalPath); + // Fix for http://orchard.codeplex.com/workitem/17920 + // By forcing the CBM to build App_Code, etc, we ensure that the ASP.NET BuildManager + // is in a state where it can safely (i.e. in a multi-threaded safe way) process + // multiple concurrent calls to "GetCompiledAssembly". + clientBuildManager.CompileApplicationDependencies(); return (CommandHost)clientBuildManager.CreateObject(hostType, false); } }