diff --git a/README.md b/README.md index 3184d2024d..bce027090f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you're interested in making changes to Belle without running Visual Studio ma Note that you can always [download a nightly build](http://nightly.umbraco.org/?container=umbraco-750) so you don't have to build the code yourself. -## Watch a introduction video ## +## Watch an introduction video ## [![ScreenShot](http://umbraco.com/images/whatisumbraco.png)](https://umbraco.tv/videos/umbraco-v7/content-editor/basics/introduction/cms-explanation/) diff --git a/src/Umbraco.Core/Events/MigrationEventArgs.cs b/src/Umbraco.Core/Events/MigrationEventArgs.cs index 008e50d2ee..89dfe56294 100644 --- a/src/Umbraco.Core/Events/MigrationEventArgs.cs +++ b/src/Umbraco.Core/Events/MigrationEventArgs.cs @@ -128,8 +128,14 @@ namespace Umbraco.Core.Events get { return TargetSemVersion.GetVersion(); } } + /// + /// Gets the origin version of the migration, i.e. the one that is currently installed. + /// public SemVersion ConfiguredSemVersion { get; private set; } + /// + /// Gets the target version of the migration. + /// public SemVersion TargetSemVersion { get; private set; } public string ProductName { get; private set; } diff --git a/src/Umbraco.Core/Persistence/Factories/ContentTypeFactory.cs b/src/Umbraco.Core/Persistence/Factories/ContentTypeFactory.cs index 6fa13654ad..3672f80873 100644 --- a/src/Umbraco.Core/Persistence/Factories/ContentTypeFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/ContentTypeFactory.cs @@ -122,7 +122,7 @@ namespace Umbraco.Core.Persistence.Factories else if (entity is IMemberType) nodeObjectType = Constants.ObjectTypes.MemberTypeGuid; else - throw new Exception("oops: invalid entity."); + throw new Exception("Invalid entity."); var contentTypeDto = new ContentTypeDto { diff --git a/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs b/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs index 5e34fb8936..b4d5d2e566 100644 --- a/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs @@ -79,7 +79,7 @@ namespace Umbraco.Core.Persistence.Factories { // note: no idea why Id is nullable here, but better check if (groupDto.Id.HasValue == false) - throw new Exception("oops: groupDto.Id has no value."); + throw new Exception("GroupDto.Id has no value."); group.Id = groupDto.Id.Value; } diff --git a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs index cbaa92da21..4652ce47be 100644 --- a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs @@ -320,13 +320,14 @@ namespace Umbraco.Core.Persistence.Repositories /// public IEnumerable GetPagedResultsByQuery(IQuery query, int pageIndex, int pageSize, out int totalRecords, Expression> orderBy) { + if (orderBy == null) + throw new ArgumentNullException("orderBy"); + // get the referenced column name and find the corresp mapped column name var expressionMember = ExpressionHelper.GetMemberInfo(orderBy); var mapper = MappingResolver.Current.ResolveMapperByType(typeof(IUser)); var mappedField = mapper.Map(expressionMember.Name); - if (orderBy == null) - throw new ArgumentNullException("orderBy"); if (mappedField.IsNullOrWhiteSpace()) throw new ArgumentException("Could not find a mapping for the column specified in the orderBy clause"); diff --git a/src/Umbraco.Tests/TestHelpers/TestHelper.cs b/src/Umbraco.Tests/TestHelpers/TestHelper.cs index 5e362ee1f8..6c8fc9308d 100644 --- a/src/Umbraco.Tests/TestHelpers/TestHelper.cs +++ b/src/Umbraco.Tests/TestHelpers/TestHelper.cs @@ -142,7 +142,13 @@ namespace Umbraco.Tests.TestHelpers } else if (dateTimeFormat.IsNullOrWhiteSpace() == false && actualValue is DateTime) { - Assert.AreEqual(((DateTime) expectedValue).ToString(dateTimeFormat), ((DateTime)actualValue).ToString(dateTimeFormat), "Property {0}.{1} does not match. Expected: {2} but was: {3}", property.DeclaringType.Name, property.Name, expectedValue, actualValue); + // round to second else in some cases tests can fail ;-( + var expectedDateTime = (DateTime) expectedValue; + expectedDateTime = expectedDateTime.AddTicks(-(expectedDateTime.Ticks%TimeSpan.TicksPerSecond)); + var actualDateTime = (DateTime) actualValue; + actualDateTime = actualDateTime.AddTicks(-(actualDateTime.Ticks % TimeSpan.TicksPerSecond)); + + Assert.AreEqual(expectedDateTime.ToString(dateTimeFormat), actualDateTime.ToString(dateTimeFormat), "Property {0}.{1} does not match. Expected: {2} but was: {3}", property.DeclaringType.Name, property.Name, expectedValue, actualValue); } else { diff --git a/src/Umbraco.Web.UI.Client/src/common/mocks/editors/prevalues.mocks.js b/src/Umbraco.Web.UI.Client/src/common/mocks/editors/prevalues.mocks.js index d181d3d25a..a2d0a6fa3b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/mocks/editors/prevalues.mocks.js +++ b/src/Umbraco.Web.UI.Client/src/common/mocks/editors/prevalues.mocks.js @@ -58,7 +58,7 @@ angular.module('umbraco.mocks'). "view": "textstring", "icon": "icon-quote", "config": { - "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-variant: italic; font-size: 18px", + "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-style: italic; font-size: 18px", "markup": "
#value#
" } } diff --git a/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js b/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js index 6365606a5a..d4393dd20b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js +++ b/src/Umbraco.Web.UI.Client/src/common/mocks/services/localization.mocks.js @@ -134,7 +134,7 @@ angular.module('umbraco.mocks'). "content_nodeName": "Page Title", "content_otherElements": "Properties", "content_parentNotPublished": "This document is published but is not visible because the parent '%0%' is unpublished", - "content_parentNotPublishedAnomaly": "Oops: this document is published but is not in the cache (internal error)", + "content_parentNotPublishedAnomaly": "This document is published but is not in the cache", "content_publish": "Publish", "content_publishStatus": "Publication Status", "content_releaseDate": "Publish at", diff --git a/src/Umbraco.Web.UI.Client/src/config/grid.editors.config.js b/src/Umbraco.Web.UI.Client/src/config/grid.editors.config.js index 3b1e2b7083..8301f15a14 100644 --- a/src/Umbraco.Web.UI.Client/src/config/grid.editors.config.js +++ b/src/Umbraco.Web.UI.Client/src/config/grid.editors.config.js @@ -39,7 +39,7 @@ "view": "textstring", "icon": "icon-quote", "config": { - "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-variant: italic; font-size: 18px", + "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-style: italic; font-size: 18px", "markup": "
#value#
" } } diff --git a/src/Umbraco.Web.UI.Client/src/less/healthcheck.less b/src/Umbraco.Web.UI.Client/src/less/healthcheck.less index 96b8a611db..6e82d424bb 100644 --- a/src/Umbraco.Web.UI.Client/src/less/healthcheck.less +++ b/src/Umbraco.Web.UI.Client/src/less/healthcheck.less @@ -151,6 +151,15 @@ background-color: @blueDark; } +.umb-era-button.-red { + background: @btnDangerBackground; + color: white; +} + +.umb-era-button.-red:hover { + background-color: darken(@btnDangerBackground, 5%); +} + .umb-era-button.-link { padding: 0; background: transparent; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html index b680ec9daa..f30851e62e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html @@ -12,10 +12,10 @@
- {{item.name}} + {{item.name}} - {{item.name}} + {{item.name}} {{item.name}} diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js index 53c0e0419d..68d304198e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js @@ -192,27 +192,43 @@ function startupLatestEditsController($scope) { } angular.module("umbraco").controller("Umbraco.Dashboard.StartupLatestEditsController", startupLatestEditsController); -function MediaFolderBrowserDashboardController($rootScope, $scope, contentTypeResource) { +function MediaFolderBrowserDashboardController($rootScope, $scope, $location, contentTypeResource, userService) { - //get the system media listview - contentTypeResource.getPropertyTypeScaffold(-96) - .then(function(dt) { + var currentUser = {}; - $scope.fakeProperty = { - alias: "contents", - config: dt.config, - description: "", - editor: dt.editor, - hideLabel: true, - id: 1, - label: "Contents:", - validation: { - mandatory: false, - pattern: null - }, - value: "", - view: dt.view - }; + userService.getCurrentUser().then(function (user) { + + currentUser = user; + + // check if the user start node is the dashboard + if(currentUser.startMediaId === -1) { + + //get the system media listview + contentTypeResource.getPropertyTypeScaffold(-96) + .then(function(dt) { + + $scope.fakeProperty = { + alias: "contents", + config: dt.config, + description: "", + editor: dt.editor, + hideLabel: true, + id: 1, + label: "Contents:", + validation: { + mandatory: false, + pattern: null + }, + value: "", + view: dt.view + }; + + }); + + } else { + // redirect to start node + $location.path("/media/media/edit/" + currentUser.startMediaId); + } }); diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/redirecturls.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/redirecturls.html index c63a444839..f23b8f5df9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/redirecturls.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/redirecturls.html @@ -77,7 +77,7 @@ {{redirectUrl.destinationUrl}} - + diff --git a/src/Umbraco.Web.UI.Client/src/views/packager/views/repo.html b/src/Umbraco.Web.UI.Client/src/views/packager/views/repo.html index b19eb63232..3975dc96d9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packager/views/repo.html +++ b/src/Umbraco.Web.UI.Client/src/views/packager/views/repo.html @@ -199,7 +199,7 @@
Created:
-
{{vm.package.created}}
+
{{vm.package.created | date:'yyyy-MM-dd HH:mm:ss'}}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/layoutconfig.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/layoutconfig.html index 5f5c956c22..f87262daaf 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/layoutconfig.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/layoutconfig.html @@ -35,13 +35,13 @@
-
+
- + {{currentSection.grid}} - +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/rowconfig.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/rowconfig.html index 93b9bcce44..421aaf0d40 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/rowconfig.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/rowconfig.html @@ -44,17 +44,15 @@
-
-
- - - +
+ + + {{currentCell.grid}} - - - -
-
+ + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html index e274249b42..e1c0118497 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html @@ -44,7 +44,7 @@ center="model.value.focalPoint" on-image-loaded="imageLoaded"> - Remove file + Remove file
    diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html index 3cb01386ba..68d2fc6f4d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html @@ -4,10 +4,10 @@
  • - + - + diff --git a/src/Umbraco.Web.UI/config/grid.editors.config.js b/src/Umbraco.Web.UI/config/grid.editors.config.js index 7686de5270..b904920566 100644 --- a/src/Umbraco.Web.UI/config/grid.editors.config.js +++ b/src/Umbraco.Web.UI/config/grid.editors.config.js @@ -39,7 +39,7 @@ "view": "textstring", "icon": "icon-quote", "config": { - "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-variant: italic; font-size: 18px", + "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-style: italic; font-size: 18px", "markup": "
    #value#
    " } } diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 331fc3fe1f..92160e85f0 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -147,9 +147,9 @@ Page Title Properties This document is published but is not visible because the parent '%0%' is unpublished - Oops: this document is published but is not in the cache (internal error - see log) - Oops: could not get the url (internal error - see log) - Oops: this document is published but its url would collide with content %0% + This document is published but is not in the cache + Could not get the url + This document is published but its url would collide with content %0% Publish Publication Status Publish at diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index f0f770c99d..aa896185d3 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -148,9 +148,9 @@ Page Title Properties This document is published but is not visible because the parent '%0%' is unpublished - Oops: this document is published but is not in the cache (internal error - see log) - Oops: could not get the url (internal error - see log) - Oops: this document is published but its url would collide with content %0% + This document is published but is not in the cache + Could not get the url + This document is published but its url would collide with content %0% Publish Publication Status Publish at diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml index ff3c94b74d..75c5630678 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml @@ -499,6 +499,7 @@ Установить Неверно Выравнивание + Название Язык Макет Загрузка @@ -654,6 +655,7 @@ Медиа - всего в XML: %0%, всего: %1%Б с ошибками: %2% Содержимое - всего в XML: %0%, всего опубликовано: %1%, с ошибками: %2% + Сертификат Вашего сайта отмечен как проверенный. Ошибка проверки сертификата: '%0%' Ошибка проверки адреса URL %0% - '%1%' Сейчас Вы %0% просматриваете сайт, используя протокол HTTPS. @@ -1065,6 +1067,23 @@ Чтобы опубликовать ранее неопубликованные документы среди дочерних, отметьте опцию Включая неопубликованные дочерние документы. ]]> + + Остановить отслеживание URL + Запустить отслеживание URL + Первоначальный URL + Перенаправлен в + На данный момент нет ни одного перенаправления + Если опубликованный документ переименовывается или меняет свое расположение в дереве, а следовательно, меняется адрес (URL), автоматически создается перенаправление на новое местоположение этого документа. + Удалить + Вы уверены, что хотите удалить перенаправление с '%0%' на '%1%'? + Перенаправление удалено. + Ошибка удаления перенаправления. + Вы уверены, что хотите остановить отслеживание URL? + Отслеживание URL в настоящий момент остановлено. + Ошибка остановки отслеживания URL, более подробные сведения находятся в системном журнале. + Отслеживание URL в настоящий момент запущено. + Ошибка запуска отслеживания URL, более подробные сведения находятся в системном журнале. + Заголовок Укажите заголовок diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx index 683299e5be..77deab2709 100644 --- a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx +++ b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx @@ -108,16 +108,14 @@
- -
-

+

+ \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js b/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js index 8c3d97c52b..d15c173632 100644 --- a/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js +++ b/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js @@ -389,12 +389,12 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); processData: false, success: function (data, textStatus) { if (textStatus == "error") { - alert("Oops. Could not update sort order"); + alert("Could not update sort order"); self._getChildNodes(); } }, error: function(data) { - alert("Oops. Could not update sort order. Err: " + data.statusText); + alert("Could not update sort order. Err: " + data.statusText); self._getChildNodes(); } }); diff --git a/src/Umbraco.Web/Editors/AuthenticationController.cs b/src/Umbraco.Web/Editors/AuthenticationController.cs index 426adcf02f..14dbdac1d4 100644 --- a/src/Umbraco.Web/Editors/AuthenticationController.cs +++ b/src/Umbraco.Web/Editors/AuthenticationController.cs @@ -215,7 +215,7 @@ namespace Umbraco.Web.Editors if (user != null && user.IsLockedOut == false) { var code = await UserManager.GeneratePasswordResetTokenAsync(identityUser.Id); - var callbackUrl = ConstuctCallbackUrl(identityUser.Id, code); + var callbackUrl = ConstructCallbackUrl(identityUser.Id, code); var message = Services.TextService.Localize("resetPasswordEmailCopyFormat", //Ensure the culture of the found user is used for the email! @@ -233,12 +233,11 @@ namespace Umbraco.Web.Editors return Request.CreateResponse(HttpStatusCode.OK); } - private string ConstuctCallbackUrl(int userId, string code) + private string ConstructCallbackUrl(int userId, string code) { - //get an mvc helper to get the url + // Get an mvc helper to get the url var http = EnsureHttpContext(); var urlHelper = new UrlHelper(http.Request.RequestContext); - var action = urlHelper.Action("ValidatePasswordResetCode", "BackOffice", new { @@ -247,12 +246,10 @@ namespace Umbraco.Web.Editors r = code }); - //TODO: Virtual path? - - return string.Format("{0}://{1}{2}", - http.Request.Url.Scheme, - http.Request.Url.Host + (http.Request.Url.Port == 80 ? string.Empty : ":" + http.Request.Url.Port), - action); + // Construct full URL using configured application URL (which will fall back to request) + var applicationUri = new Uri(ApplicationContext.UmbracoApplicationUrl); + var callbackUri = new Uri(applicationUri, action); + return callbackUri.ToString(); } /// diff --git a/src/Umbraco.Web/Strategies/Migrations/RebuildMediaXmlCacheAfterUpgrade.cs b/src/Umbraco.Web/Strategies/Migrations/RebuildMediaXmlCacheAfterUpgrade.cs deleted file mode 100644 index c3920677c5..0000000000 --- a/src/Umbraco.Web/Strategies/Migrations/RebuildMediaXmlCacheAfterUpgrade.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Umbraco.Core; -using Umbraco.Core.Events; -using Umbraco.Core.Persistence.Migrations; -using Umbraco.Core.Services; -using umbraco.interfaces; -using Umbraco.Core.Configuration; - -namespace Umbraco.Web.Strategies.Migrations -{ - /// - /// This will execute after upgrading to rebuild the xml cache - /// - /// - /// This cannot execute as part of a db migration since we need access to the services/repos. - /// - /// This will execute for specific versions - - /// - /// * If current is less than or equal to 7.0.0 - /// - public class RebuildMediaXmlCacheAfterUpgrade : MigrationStartupHander - { - protected override void AfterMigration(MigrationRunner sender, MigrationEventArgs e) - { - if (e.ProductName != GlobalSettings.UmbracoMigrationName) return; - - var target70 = new Version(7, 0, 0); - - if (e.ConfiguredVersion <= target70) - { - var mediasvc = (MediaService)ApplicationContext.Current.Services.MediaService; - mediasvc.RebuildXmlStructures(); - } - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/Strategies/Migrations/RebuildXmlCachesAfterUpgrade.cs b/src/Umbraco.Web/Strategies/Migrations/RebuildXmlCachesAfterUpgrade.cs new file mode 100644 index 0000000000..e62a738675 --- /dev/null +++ b/src/Umbraco.Web/Strategies/Migrations/RebuildXmlCachesAfterUpgrade.cs @@ -0,0 +1,52 @@ +using System; +using umbraco; +using Umbraco.Core; +using Umbraco.Core.Events; +using Umbraco.Core.Persistence.Migrations; +using Umbraco.Core.Services; +using GlobalSettings = Umbraco.Core.Configuration.GlobalSettings; + +namespace Umbraco.Web.Strategies.Migrations +{ + /// + /// Rebuilds the Xml caches after upgrading. + /// This will execute after upgrading to rebuild the xml cache + /// + /// + /// This cannot execute as part of a DB migration since it needs access to services and repositories. + /// Executes for: + /// - Media Xml : if current is less than, or equal to, 7.0.0 (superceeded by the next rule) + /// - Media & Content Xml : if current is less than, or equal to, 7.3.0 - because 7.3.0 adds .Key to cached items + /// + /// + public class RebuildXmlCachesAfterUpgrade : MigrationStartupHander + { + protected override void AfterMigration(MigrationRunner sender, MigrationEventArgs e) + { + if (e.ProductName != GlobalSettings.UmbracoMigrationName) return; + + var v730 = new Semver.SemVersion(new Version(7, 3, 0)); + + var doMedia = e.ConfiguredSemVersion < v730; + var doContent = e.ConfiguredSemVersion < v730; + + if (doMedia) + { + var mediaService = (MediaService) ApplicationContext.Current.Services.MediaService; + mediaService.RebuildXmlStructures(); + + // note: not re-indexing medias? + } + + if (doContent) + { + // rebuild Xml in database + var contentService = (ContentService) ApplicationContext.Current.Services.ContentService; + contentService.RebuildXmlStructures(); + + // refresh the Xml cache + content.Instance.RefreshContentFromDatabase(); + } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 9eb0b0ef4f..f242081283 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -921,7 +921,7 @@ Resources.resx - +