diff --git a/Orchard.proj b/Orchard.proj index 92d276e72..1c221bb36 100644 --- a/Orchard.proj +++ b/Orchard.proj @@ -323,6 +323,7 @@ - + (); if (String.IsNullOrEmpty(field.Value) && !String.IsNullOrEmpty(settings.DefaultValue)) { @@ -103,4 +104,4 @@ namespace Orchard.Core.Common.Drivers { .Enumerate(() => field => new[] { field.Value }); } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs b/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs index b7b353884..1038e93ab 100644 --- a/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs @@ -104,7 +104,7 @@ namespace Orchard.Autoroute.Handlers { // Is this the current home page? if (part.ContentItem.Id == homePageId) { - _orchardServices.Notifier.Warning(T("You removed the content item that served as the site\'s home page. \nMost possibly this means that instead of the home page a \"404 Not Found\" error page will be displayed without a link to log in or access the dashboard. \n\nTo prevent this you can e.g. publish a content item that has the \"Set as home page\" checkbox ticked.")); + _orchardServices.Notifier.Warning(T("You removed the content item that served as the site's home page. \nMost possibly this means that instead of the home page a \"404 Not Found\" page will be displayed. \n\nTo prevent this you can e.g. publish a content item that has the \"Set as home page\" checkbox ticked.")); } _autorouteService.Value.RemoveAliases(part); } diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs index 9c580973a..126eca84d 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs @@ -272,8 +272,8 @@ namespace Orchard.ContentTypes.Services { _contentDefinitionEventHandlers.ContentPartRemoved(new ContentPartRemovedContext {ContentPartDefinition = partDefinition}); } - public IEnumerable GetFields() { - return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo()); + public IEnumerable GetFields() { + return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo()).GroupBy(x => x.FieldTypeName).Select(g => g.First()); } public void AddFieldToPart(string fieldName, string fieldTypeName, string partName) { diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Drivers/TextFieldDriver.cs b/src/Orchard.Web/Modules/Orchard.Fields/Drivers/TextFieldDriver.cs index 9863aa6d1..6cbe67a56 100644 --- a/src/Orchard.Web/Modules/Orchard.Fields/Drivers/TextFieldDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Fields/Drivers/TextFieldDriver.cs @@ -19,11 +19,11 @@ namespace Orchard.Fields.Drivers { protected override DriverResult Editor(ContentPart part, TextField field, IUpdateModel updater, dynamic shapeHelper) { var settings = field.PartFieldDefinition.Settings.GetModel(); - if (String.IsNullOrEmpty(field.Value) && !String.IsNullOrEmpty(settings.DefaultValue)) { + if (!String.IsNullOrEmpty(settings.DefaultValue) && (String.IsNullOrEmpty(field.Value) || field.Value.Equals(settings.DefaultValue))) { field.Value = _tokenizer.Replace(settings.DefaultValue, new Dictionary { { "Content", part.ContentItem } }); } return null; } } -} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js index f7d7a29d6..d0fbf6849 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Scripts/media-library.js @@ -610,7 +610,5 @@ $(function () { return false; }); - // Select recent folder when the page is initialized. - viewModel.selectRecent(); })(window.mediaLibrarySettings); }) diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs index 5954e8833..6cf12eb82 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs @@ -139,10 +139,9 @@ namespace Orchard.MultiTenancy.Controllers { return new HttpUnauthorizedResult(); var tenant = _tenantService.GetTenants().FirstOrDefault(ss => ss.Name == viewModel.Name); + if (tenant == null) return HttpNotFound(); - else if (tenant.Name == _thisShellSettings.Name) - return new HttpUnauthorizedResult(); if (!ModelState.IsValid) { return View(viewModel); diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs index 94de8fd3a..2b9c1cc94 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs @@ -41,7 +41,7 @@ namespace Orchard.Taxonomies.Controllers { var taxonomy = _taxonomyService.GetTaxonomy(taxonomyId); - var terms = _taxonomyService.GetTermsQuery(taxonomyId).Slice(pager.GetStartIndex(), pager.PageSize); + var terms = TermPart.Sort(_taxonomyService.GetTermsQuery(taxonomyId).Slice(pager.GetStartIndex(), pager.PageSize)); var pagerShape = Shape.Pager(pager).TotalItemCount(_taxonomyService.GetTermsQuery(taxonomyId).Count()); diff --git a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs index de4ff20b2..b498d6431 100644 --- a/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs +++ b/src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs @@ -62,8 +62,7 @@ namespace Orchard.Taxonomies.Drivers { protected override DriverResult Editor(ContentPart part, TaxonomyField field, IUpdateModel updater, dynamic shapeHelper) { // Initializing viewmodel using the terms that are already selected to prevent loosing them when updating an editor group this field isn't displayed in. - // Get all the selected, published terms of all the TaxonomyFields of the content item. - var appliedTerms = GetAppliedTerms(part).ToList(); + var appliedTerms = GetAppliedTerms(part, field, VersionOptions.Latest).ToList(); var viewModel = new TaxonomyFieldViewModel { Terms = appliedTerms.Select(t => t.CreateTermEntry()).ToList() }; foreach (var item in viewModel.Terms) item.IsChecked = true; diff --git a/src/Orchard.Web/Themes/TheAdmin/Theme.txt b/src/Orchard.Web/Themes/TheAdmin/Theme.txt index 548de928b..2c456caa6 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Theme.txt +++ b/src/Orchard.Web/Themes/TheAdmin/Theme.txt @@ -2,6 +2,6 @@ Version: 1.10 Author: Jon Wall Tags: hidden, admin -Description: An admin theme not to be used for the site so don't click "Activate" (or "Uninstall"). In the near future admin themes won't be mixed in with site themes. +Description: The Orchard admin theme. Website: http://www.orchardproject.net Zones: Header, Messages, BeforeContent, LocalNavigation, Content, AfterContent, Footer