From e8818b36bd80160ccfdd350bfed9a53a6ac2b7b9 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 26 Nov 2018 07:49:32 +0100 Subject: [PATCH 1/8] Media could not be moved to the root (The root was not available as target) --- src/Umbraco.Web/Models/Trees/TreeNode.cs | 1 + src/Umbraco.Web/Trees/ApplicationTreeController.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/Trees/TreeNode.cs b/src/Umbraco.Web/Models/Trees/TreeNode.cs index 01aa78ca36..fa1f8be310 100644 --- a/src/Umbraco.Web/Models/Trees/TreeNode.cs +++ b/src/Umbraco.Web/Models/Trees/TreeNode.cs @@ -35,6 +35,7 @@ namespace Umbraco.Web.Models.Trees CssClasses = new List(); //default Icon = "icon-folder-close"; + Path = "-1"; } [DataMember(Name = "parentId", IsRequired = true)] diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index c1192b6909..dd5e38e5fa 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.Linq; using System.Net; @@ -21,7 +22,7 @@ namespace Umbraco.Web.Trees [AngularJsonOnlyConfiguration] [PluginController("UmbracoTrees")] public class ApplicationTreeController : UmbracoAuthorizedApiController - { + { /// /// Returns the tree nodes for an application /// @@ -184,6 +185,7 @@ namespace Umbraco.Web.Trees //assign the route path based on the root node, this means it will route there when the section is navigated to //and no dashboards will be available for this section sectionRoot.RoutePath = rootNode.Result.RoutePath; + sectionRoot.Path = rootNode.Result.Path; foreach (var d in rootNode.Result.AdditionalData) { From a50a46f9fa233dc4deb6a8015ef52f696f382b44 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 26 Nov 2018 07:50:15 +0100 Subject: [PATCH 2/8] Alt of "close dialog" buttons was not functioning on the success message --- src/Umbraco.Web.UI.Client/src/views/content/copy.html | 2 +- src/Umbraco.Web.UI.Client/src/views/content/move.html | 6 +++--- src/Umbraco.Web.UI.Client/src/views/documenttypes/copy.html | 2 +- src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html | 2 +- src/Umbraco.Web.UI.Client/src/views/media/move.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/media/restore.html | 2 +- src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html | 2 +- src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/copy.html b/src/Umbraco.Web.UI.Client/src/views/content/copy.html index 03a024c439..14ea54cf42 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/copy.html @@ -14,7 +14,7 @@ {{currentNode.name}} was copied to {{target.name}} - +

diff --git a/src/Umbraco.Web.UI.Client/src/views/content/move.html b/src/Umbraco.Web.UI.Client/src/views/content/move.html index 708c3d3f82..c713bd90e7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/move.html @@ -13,13 +13,13 @@

{{currentNode.name}} was moved underneath {{target.name}}
- +

Choose where to move {{currentNode.name}} - to in the tree structure below + to in the tree structure below

@@ -29,7 +29,7 @@
- {{currentNode.name}} was copied underneath {{target.name}}
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html index af0ce58227..aada5193ec 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html @@ -22,7 +22,7 @@
{{currentNode.name}} was moved underneath {{target.name}}
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/move.html b/src/Umbraco.Web.UI.Client/src/views/media/move.html index 6d93eb4e22..15d38a6130 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/move.html @@ -13,7 +13,7 @@
{{currentNode.name}} was moved underneath {{target.name}}
- +

@@ -23,7 +23,7 @@

- +

{{currentNode.name}} was moved underneath {{target.name}}

- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html index 3d8c3b0845..2f2fe336b0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html @@ -22,7 +22,7 @@
{{currentNode.name}} was copied underneath {{target.name}}
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html index 1ae686f5d5..2230f4a1a8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html @@ -22,7 +22,7 @@
{{currentNode.name}} was moved underneath {{target.name}}
- +
From 9d2c4d7b086a9c58d3c15a0bd7541727f7327ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 17 Jan 2019 15:57:43 +0100 Subject: [PATCH 3/8] Stick to the same approach on as used on media move dialog --- src/Umbraco.Web.UI.Client/src/views/content/move.html | 2 +- src/Umbraco.Web.UI.Client/src/views/media/move.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/move.html b/src/Umbraco.Web.UI.Client/src/views/content/move.html index 2c40a61d18..fb72c38974 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/move.html @@ -15,7 +15,7 @@ was moved to {{target.name}}
- +

diff --git a/src/Umbraco.Web.UI.Client/src/views/media/move.html b/src/Umbraco.Web.UI.Client/src/views/media/move.html index 6f80b5ab90..2aebda195c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/move.html @@ -27,7 +27,7 @@

- Date: Mon, 21 Jan 2019 10:44:11 +0100 Subject: [PATCH 4/8] Delete macros --- .../src/common/resources/macro.resource.js | 6 ++++ .../src/views/macros/delete.html | 10 ++++++ .../views/macros/macros.delete.controller.js | 32 +++++++++++++++++++ src/Umbraco.Web/Editors/MacrosController.cs | 16 ++++++++++ src/Umbraco.Web/Trees/MacrosTreeController.cs | 13 ++------ 5 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/delete.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js index a5d960a9ec..73a1651b5e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/macro.resource.js @@ -115,6 +115,12 @@ function macroResource($q, $http, umbRequestHelper) { return umbRequestHelper.resourcePromise( $http.post(umbRequestHelper.getApiUrl("macroApiBaseUrl", "Save"), macro) ); + }, + + deleteById: function(id) { + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("macroApiBaseUrl", "deleteById", { "id": id })) + ); } }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/delete.html b/src/Umbraco.Web.UI.Client/src/views/macros/delete.html new file mode 100644 index 0000000000..2d097e110b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/delete.html @@ -0,0 +1,10 @@ +
+
+ +

+ Are you sure you want to delete {{vm.name}} ? +

+ + +
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js new file mode 100644 index 0000000000..1aadef9f31 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/macros/macros.delete.controller.js @@ -0,0 +1,32 @@ +/** + * @ngdoc controller + * @name Umbraco.Editors.Macros.DeleteController + * @function + * + * @description + * The controller for deleting macro items + */ +function MacrosDeleteController($scope, $location, macroResource, navigationService, treeService) { + var vm = this; + + vm.name = $scope.currentNode.name; + function performDelete() { + $scope.currentNode.loading = true; + macroResource.deleteById($scope.currentNode.id).then(function () { + $scope.currentNode.loading = false; + + treeService.removeNode($scope.currentNode); + + navigationService.hideMenu(); + }); + } + + function cancel() { + navigationService.hideDialog(); + } + + vm.performDelete = performDelete; + vm.cancel = cancel; +} + +angular.module("umbraco").controller("Umbraco.Editors.Macros.DeleteController", MacrosDeleteController); diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 5ff2f7bf34..4c198ea6b3 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -115,6 +115,22 @@ return this.Request.CreateResponse(HttpStatusCode.OK, macroDisplay); } + + [HttpPost] + public HttpResponseMessage DeleteById(int id) + { + var macro = this.Services.MacroService.GetById(id); + + if (macro == null) + { + return this.ReturnErrorResponse($"Macro with id {id} does not exist"); + } + + this.Services.MacroService.Delete(macro); + + return Request.CreateResponse(HttpStatusCode.OK); + } + [HttpPost] public HttpResponseMessage Save(MacroDisplay macroDisplay) { diff --git a/src/Umbraco.Web/Trees/MacrosTreeController.cs b/src/Umbraco.Web/Trees/MacrosTreeController.cs index cdbe4bfcf7..0300dbd6c6 100644 --- a/src/Umbraco.Web/Trees/MacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/MacrosTreeController.cs @@ -54,7 +54,7 @@ namespace Umbraco.Web.Trees { //Create the normal create action menu.Items.Add(Services.TextService); - + //refresh action menu.Items.Add(new RefreshNode(Services.TextService, true)); @@ -65,16 +65,7 @@ namespace Umbraco.Web.Trees if (macro == null) return new MenuItemCollection(); //add delete option for all macros - menu.Items.Add(Services.TextService, opensDialog: true) - //Since we haven't implemented anything for macros in angular, this needs to be converted to - //use the legacy format - .ConvertLegacyMenuItem(new EntitySlim - { - Id = macro.Id, - Level = 1, - ParentId = -1, - Name = macro.Name - }, "macros", queryStrings.GetValue("application")); + menu.Items.Add(Services.TextService, opensDialog: true); return menu; } From 57902892f9066d72621d38adcfc3978fc36f4b70 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 21 Jan 2019 10:55:48 +0100 Subject: [PATCH 5/8] Constructor injection --- .../Editors/MacroRenderingController.cs | 18 ++++++++----- src/Umbraco.Web/Editors/MacrosController.cs | 27 ++++++++++++------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/Umbraco.Web/Editors/MacroRenderingController.cs b/src/Umbraco.Web/Editors/MacroRenderingController.cs index 08ff4ca44b..0b4a78e603 100644 --- a/src/Umbraco.Web/Editors/MacroRenderingController.cs +++ b/src/Umbraco.Web/Editors/MacroRenderingController.cs @@ -15,6 +15,7 @@ using Umbraco.Web.Macros; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Core.Models.PublishedContent; +using Umbraco.Core.Services; namespace Umbraco.Web.Editors { @@ -29,11 +30,14 @@ namespace Umbraco.Web.Editors [PluginController("UmbracoApi")] public class MacroRenderingController : UmbracoAuthorizedJsonController, IRequiresSessionState { + private readonly IMacroService _macroService; + private readonly IContentService _contentService; private readonly IVariationContextAccessor _variationContextAccessor; - - public MacroRenderingController(IVariationContextAccessor variationContextAccessor) + public MacroRenderingController(IVariationContextAccessor variationContextAccessor, IMacroService macroService, IContentService contentService) { _variationContextAccessor = variationContextAccessor; + _macroService = macroService; + _contentService = contentService; } /// @@ -41,12 +45,12 @@ namespace Umbraco.Web.Editors /// /// /// - /// Note that ALL logged in users have access to this method because editors will need to isnert macros into rte (content/media/members) and it's used for + /// Note that ALL logged in users have access to this method because editors will need to insert macros into rte (content/media/members) and it's used for /// inserting into templates/views/etc... it doesn't expose any sensitive data. /// public IEnumerable GetMacroParameters(int macroId) { - var macro = Services.MacroService.GetById(macroId); + var macro = _macroService.GetById(macroId); if (macro == null) { throw new HttpResponseException(HttpStatusCode.NotFound); @@ -97,13 +101,13 @@ namespace Umbraco.Web.Editors { // note - here we should be using the cache, provided that the preview content is in the cache... - var doc = Services.ContentService.GetById(pageId); + var doc = _contentService.GetById(pageId); if (doc == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } - var m = Services.MacroService.GetByAlias(macroAlias); + var m = _macroService.GetByAlias(macroAlias); if (m == null) throw new HttpResponseException(HttpStatusCode.NotFound); var macro = new MacroModel(m); @@ -166,7 +170,7 @@ namespace Umbraco.Web.Editors MacroSource = model.VirtualPath.EnsureStartsWith("~") }; - Services.MacroService.Save(macro); // may throw + _macroService.Save(macro); // may throw return new HttpResponseMessage(HttpStatusCode.OK); } diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 4c198ea6b3..84cd1911c3 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Web.Editors +using Umbraco.Core.Services; + +namespace Umbraco.Web.Editors { using System; using System.Collections.Generic; @@ -28,6 +30,13 @@ [UmbracoTreeAuthorize(Constants.Trees.Macros)] public class MacrosController : BackOfficeNotificationsController { + private readonly IMacroService _macroService; + + public MacrosController(IMacroService macroService) + { + _macroService = macroService; + } + /// /// Creates a new macro /// @@ -47,7 +56,7 @@ var alias = name.ToSafeAlias(); - if (this.Services.MacroService.GetByAlias(alias) != null) + if (_macroService.GetByAlias(alias) != null) { return this.ReturnErrorResponse("Macro with this alias already exists"); } @@ -62,7 +71,7 @@ MacroType = MacroTypes.PartialView }; - this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); + _macroService.Save(macro, this.Security.CurrentUser.Id); return this.Request.CreateResponse(HttpStatusCode.OK, macro.Id); } @@ -75,7 +84,7 @@ [HttpGet] public HttpResponseMessage GetById(int id) { - var macro = this.Services.MacroService.GetById(id); + var macro = _macroService.GetById(id); if (macro == null) { @@ -119,14 +128,14 @@ [HttpPost] public HttpResponseMessage DeleteById(int id) { - var macro = this.Services.MacroService.GetById(id); + var macro = _macroService.GetById(id); if (macro == null) { return this.ReturnErrorResponse($"Macro with id {id} does not exist"); } - this.Services.MacroService.Delete(macro); + _macroService.Delete(macro); return Request.CreateResponse(HttpStatusCode.OK); } @@ -139,7 +148,7 @@ return this.ReturnErrorResponse($"No macro data found in request"); } - var macro = this.Services.MacroService.GetById(int.Parse(macroDisplay.Id.ToString())); + var macro = _macroService.GetById(int.Parse(macroDisplay.Id.ToString())); if (macro == null) { @@ -148,7 +157,7 @@ if (macroDisplay.Alias != macro.Alias) { - var macroByAlias = this.Services.MacroService.GetByAlias(macroDisplay.Alias); + var macroByAlias = _macroService.GetByAlias(macroDisplay.Alias); if (macroByAlias != null) { @@ -169,7 +178,7 @@ try { - this.Services.MacroService.Save(macro, this.Security.CurrentUser.Id); + _macroService.Save(macro, this.Security.CurrentUser.Id); macroDisplay.Notifications.Clear(); From dd29deec6a4e676c197c40d9bc35c6e5f6744211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 21 Jan 2019 13:30:49 +0100 Subject: [PATCH 6/8] =?UTF-8?q?V8=20Gulp=20=E2=80=94=20only=20run=20imagem?= =?UTF-8?q?in=20in=20production=20mode.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gulp/tasks/dependencies.js | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js index 8032274ee7..e9ada635e5 100644 --- a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js +++ b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js @@ -251,21 +251,24 @@ gulp.task('dependencies', function () { //Copies all static assets into /root / assets folder //css, fonts and image files - stream.add( - gulp.src(config.sources.globs.assets) - .pipe(imagemin([ - imagemin.gifsicle({interlaced: true}), - imagemin.jpegtran({progressive: true}), - imagemin.optipng({optimizationLevel: 5}), - imagemin.svgo({ - plugins: [ - {removeViewBox: true}, - {cleanupIDs: false} - ] - }) - ])) - .pipe(gulp.dest(config.root + config.targets.assets)) - ); + + var assetsTask = gulp.src(config.sources.globs.assets); + if (global.isProd === true) { + assetsTask = assetsTask.pipe(imagemin([ + imagemin.gifsicle({interlaced: true}), + imagemin.jpegtran({progressive: true}), + imagemin.optipng({optimizationLevel: 5}), + imagemin.svgo({ + plugins: [ + {removeViewBox: true}, + {cleanupIDs: false} + ] + }) + ])); + } + assetsTask = assetsTask.pipe(gulp.dest(config.root + config.targets.assets)); + + stream.add(assetsTask); // Copies all the less files related to the preview into their folder //these are not pre-processed as preview has its own less combiler client side From 4a0b969777eb24f80269ff4d9197299b18d74538 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 21 Jan 2019 15:39:19 +0100 Subject: [PATCH 7/8] Deal with fixme in Umbraco.Core --- src/Umbraco.Core/Cache/AppCaches.cs | 2 +- src/Umbraco.Core/Cache/CacheKeys.cs | 4 +- src/Umbraco.Core/Cache/DictionaryAppCache.cs | 3 +- src/Umbraco.Core/Cache/HttpRequestAppCache.cs | 2 +- src/Umbraco.Core/Cache/IAppPolicyCache.cs | 2 - src/Umbraco.Core/Composing/Current.cs | 2 +- src/Umbraco.Core/Composing/Lifetime.cs | 2 +- src/Umbraco.Core/Composing/TypeHelper.cs | 3 - .../Configuration/GlobalSettings.cs | 5 +- .../Configuration/Grid/GridEditorsConfig.cs | 2 +- .../Configuration/IGlobalSettings.cs | 11 - .../Configuration/UmbracoVersion.cs | 2 +- src/Umbraco.Core/ContentExtensions.cs | 2 +- src/Umbraco.Core/Deploy/IPreValueConnector.cs | 2 +- src/Umbraco.Core/Events/DeleteEventArgs.cs | 4 +- .../Events/QueuingEventDispatcher.cs | 2 +- .../Events/QueuingEventDispatcherBase.cs | 6 +- .../Events/ScopeLifetimeMessagesFactory.cs | 60 ----- src/Umbraco.Core/IO/FileSystems.cs | 2 +- src/Umbraco.Core/IO/PhysicalFileSystem.cs | 2 +- src/Umbraco.Core/IO/SystemDirectories.cs | 1 - src/Umbraco.Core/IO/SystemFiles.cs | 3 - .../ExpressionBuilderBaseOfNext.cs | 2 - .../Migrations/IMigrationExpression.cs | 2 +- .../Install/DatabaseSchemaResult.cs | 2 +- .../Upgrade/V_8_0_0/AddVariationTables1A.cs | 2 - .../Upgrade/V_8_0_0/AddVariationTables2.cs | 2 - src/Umbraco.Core/Models/ContentBase.cs | 4 +- src/Umbraco.Core/Models/ContentTypeBase.cs | 2 +- .../Models/Entities/EntitySlim.cs | 2 - .../Models/Entities/TreeEntityBase.cs | 5 +- src/Umbraco.Core/Models/GridValue.cs | 4 +- src/Umbraco.Core/Models/IContent.cs | 2 +- src/Umbraco.Core/Models/IContentBase.cs | 2 - .../Models/IContentTypeComposition.cs | 2 +- .../Models/Identity/BackOfficeIdentityUser.cs | 4 +- src/Umbraco.Core/Models/MediaExtensions.cs | 2 +- src/Umbraco.Core/Models/Membership/User.cs | 2 +- .../Models/Packaging/CompiledPackage.cs | 16 +- src/Umbraco.Core/Models/Property.cs | 4 +- src/Umbraco.Core/Models/PropertyCollection.cs | 2 +- .../Models/PropertyGroupCollection.cs | 2 +- .../Models/PropertyTagsExtensions.cs | 2 +- src/Umbraco.Core/Models/PropertyType.cs | 6 +- .../Models/PropertyTypeCollection.cs | 4 +- .../PublishedContent/IPublishedContent.cs | 2 +- .../PublishedContentEnumerable.cs | 64 ------ .../PublishedContent/PublishedContentType.cs | 6 +- .../PublishedContent/PublishedPropertyType.cs | 2 +- .../Persistence/Constants-DatabaseSchema.cs | 10 +- .../Dtos/ContentVersionCultureVariationDto.cs | 4 +- .../Persistence/Dtos/ContentVersionDto.cs | 6 +- .../Persistence/Dtos/DataTypeDto.cs | 2 +- src/Umbraco.Core/Persistence/Dtos/NodeDto.cs | 4 +- .../Persistence/Dtos/User2UserGroupDto.cs | 18 -- .../Factories/ContentBaseFactory.cs | 12 +- src/Umbraco.Core/Persistence/LocalDb.cs | 4 +- .../Persistence/Mappers/UserTypeMapper.cs | 28 --- .../NPocoDatabaseExtensions-Bulk.cs | 4 +- .../Persistence/NPocoDatabaseExtensions.cs | 2 +- .../Persistence/NPocoSqlExtensions.cs | 2 +- .../Querying/ExpressionVisitorBase.cs | 3 +- .../Implement/ContentRepositoryBase.cs | 217 +----------------- .../Implement/ContentTypeRepository.cs | 1 - .../Implement/ContentTypeRepositoryBase.cs | 4 +- .../Implement/DataTypeRepository.cs | 2 +- .../Implement/DocumentRepository.cs | 25 +- .../Implement/EntityRepository.cs | 18 +- .../Repositories/Implement/MediaRepository.cs | 11 +- .../Implement/MemberRepository.cs | 16 +- .../Implement/NPocoRepositoryBase.cs | 2 +- .../Implement/RepositoryBaseOfTIdTEntity.cs | 2 +- .../Implement/ServerRegistrationRepository.cs | 2 +- .../Repositories/Implement/UserRepository.cs | 6 +- src/Umbraco.Core/Persistence/SqlTemplate.cs | 1 - .../Persistence/UmbracoDatabase.cs | 4 +- .../Persistence/UmbracoDatabaseFactory.cs | 7 +- src/Umbraco.Core/Properties/AssemblyInfo.cs | 2 - .../PropertyEditors/DataEditor.cs | 4 +- .../PropertyEditors/DataValueEditor.cs | 44 +--- .../PropertyEditors/IDataEditor.cs | 2 +- .../PropertyEditors/IDataValueEditor.cs | 6 +- .../ManifestValueValidatorCollection.cs | 2 +- .../PropertyValueConverterBase.cs | 1 - .../TagsPropertyEditorAttribute.cs | 2 +- .../ValueConverters/ImageCropperValue.cs | 3 +- .../ValueConverters/SliderValueConverter.cs | 2 +- .../Runtime/CoreRuntimeComposer.cs | 2 +- .../Scoping/RepositoryCacheMode.cs | 1 - src/Umbraco.Core/Scoping/Scope.cs | 21 +- src/Umbraco.Core/Scoping/ScopeContext.cs | 5 +- src/Umbraco.Core/Services/IContentService.cs | 2 +- src/Umbraco.Core/Services/IEntityService.cs | 2 +- .../Services/IEntityXmlSerializer.cs | 2 +- .../Services/Implement/ContentService.cs | 21 +- ...peServiceBaseOfTRepositoryTItemTService.cs | 2 +- .../Services/Implement/DataTypeService.cs | 8 +- .../Services/Implement/EntityService.cs | 2 +- .../Services/Implement/EntityXmlSerializer.cs | 2 +- .../Services/Implement/FileService.cs | 2 +- .../Services/Implement/MediaService.cs | 2 +- .../Services/Implement/MemberGroupService.cs | 13 -- .../Services/Implement/MemberService.cs | 5 +- .../Services/Implement/NotificationService.cs | 2 +- .../Services/Implement/RelationService.cs | 2 +- .../Implement/ScopeRepositoryService.cs | 2 +- .../Services/Implement/UserService.cs | 4 +- src/Umbraco.Core/Services/OperationResult.cs | 4 +- .../Services/OperationResultType.cs | 2 +- .../Services/PublishResultType.cs | 2 +- .../Strings/Utf8ToAsciiConverter.cs | 2 +- src/Umbraco.Core/Sync/ApplicationUrlHelper.cs | 2 +- .../Sync/DatabaseServerMessenger.cs | 2 +- src/Umbraco.Core/Umbraco.Core.csproj | 3 - 114 files changed, 186 insertions(+), 693 deletions(-) delete mode 100644 src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs delete mode 100644 src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs delete mode 100644 src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs diff --git a/src/Umbraco.Core/Cache/AppCaches.cs b/src/Umbraco.Core/Cache/AppCaches.cs index e8bc49605a..fbfc4c8c82 100644 --- a/src/Umbraco.Core/Cache/AppCaches.cs +++ b/src/Umbraco.Core/Cache/AppCaches.cs @@ -61,7 +61,7 @@ namespace Umbraco.Core.Cache /// /// /// The per-request caches works on top of the current HttpContext items. - /// fixme - what about non-web applications? + /// Outside a web environment, the behavior of that cache is unspecified. /// public IAppCache RequestCache { get; } diff --git a/src/Umbraco.Core/Cache/CacheKeys.cs b/src/Umbraco.Core/Cache/CacheKeys.cs index f358c0f881..50bd4ca0ac 100644 --- a/src/Umbraco.Core/Cache/CacheKeys.cs +++ b/src/Umbraco.Core/Cache/CacheKeys.cs @@ -5,10 +5,10 @@ /// public static class CacheKeys { - public const string ApplicationTreeCacheKey = "ApplicationTreeCache"; // used by ApplicationTreeService public const string ApplicationsCacheKey = "ApplicationCache"; // used by SectionService - public const string TemplateFrontEndCacheKey = "template"; // fixme usage? + // TODO this one can probably be removed + public const string TemplateFrontEndCacheKey = "template"; public const string MacroContentCacheKey = "macroContent_"; // used in MacroRenderers } diff --git a/src/Umbraco.Core/Cache/DictionaryAppCache.cs b/src/Umbraco.Core/Cache/DictionaryAppCache.cs index 4c08bd0524..8889630ff0 100644 --- a/src/Umbraco.Core/Cache/DictionaryAppCache.cs +++ b/src/Umbraco.Core/Cache/DictionaryAppCache.cs @@ -18,8 +18,7 @@ namespace Umbraco.Core.Cache /// public virtual object Get(string key) { - // fixme throws if non-existing, shouldn't it return null? - return Items[key]; + return Items.TryGetValue(key, out var value) ? value : null; } /// diff --git a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs index dcb2621d75..a255fea133 100644 --- a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs +++ b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Cache /// /// /// Will use HttpContext.Current. - /// fixme - should use IHttpContextAccessor + /// fixme/task: use IHttpContextAccessor NOT HttpContext.Current /// public HttpRequestAppCache() { } diff --git a/src/Umbraco.Core/Cache/IAppPolicyCache.cs b/src/Umbraco.Core/Cache/IAppPolicyCache.cs index 90b0ccb9fd..dd162b990d 100644 --- a/src/Umbraco.Core/Cache/IAppPolicyCache.cs +++ b/src/Umbraco.Core/Cache/IAppPolicyCache.cs @@ -1,8 +1,6 @@ using System; using System.Web.Caching; -// fixme should this be/support non-web? - namespace Umbraco.Core.Cache { /// diff --git a/src/Umbraco.Core/Composing/Current.cs b/src/Umbraco.Core/Composing/Current.cs index 429fee3317..12672bcc9a 100644 --- a/src/Umbraco.Core/Composing/Current.cs +++ b/src/Umbraco.Core/Composing/Current.cs @@ -29,7 +29,7 @@ namespace Umbraco.Core.Composing { private static IFactory _factory; - // fixme - refactor + // TODO: get rid of these oddities // we don't want Umbraco tests to die because the container has not been properly initialized, // for some too-important things such as IShortStringHelper or loggers, so if it's not // registered we setup a default one. We should really refactor our tests so that it does diff --git a/src/Umbraco.Core/Composing/Lifetime.cs b/src/Umbraco.Core/Composing/Lifetime.cs index e1b9950c39..a35d4d9ecf 100644 --- a/src/Umbraco.Core/Composing/Lifetime.cs +++ b/src/Umbraco.Core/Composing/Lifetime.cs @@ -15,7 +15,7 @@ /// /// One unique instance per request. /// - // fixme - not what you think! + // TODO - review lifetimes for LightInject vs other containers // currently, corresponds to 'Request' in LightInject which is 'Transient + disposed by Scope' // but NOT (in LightInject) a per-web-request lifetime, more a TransientScoped // diff --git a/src/Umbraco.Core/Composing/TypeHelper.cs b/src/Umbraco.Core/Composing/TypeHelper.cs index 1ab48b71f8..999d8d15f4 100644 --- a/src/Umbraco.Core/Composing/TypeHelper.cs +++ b/src/Umbraco.Core/Composing/TypeHelper.cs @@ -25,9 +25,6 @@ namespace Umbraco.Core.Composing /// Based on a type we'll check if it is IEnumerable{T} (or similar) and if so we'll return a List{T}, this will also deal with array types and return List{T} for those too. /// If it cannot be done, null is returned. /// - /// - /// - // fixme wtf is this and do we need it in v8? internal static IList CreateGenericEnumerableFromObject(object obj) { var type = obj.GetType(); diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index c00ab795d2..4b449decff 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -16,7 +16,8 @@ using Umbraco.Core.Security; namespace Umbraco.Core.Configuration { - //TODO: Replace checking for if the app settings exist and returning an empty string, instead return the defaults! + // TODO: Replace checking for if the app settings exist and returning an empty string, instead return the defaults! + // TODO: need to massively cleanup these configuration classes /// /// The GlobalSettings Class contains general settings information for the entire Umbraco instance based on information from web.config appsettings @@ -54,7 +55,6 @@ namespace Umbraco.Core.Configuration ResetInternal(); } - //fixme should this go on the interface or some other helper? public static bool HasSmtpServerConfigured(string appPath) { if (HasSmtpServer.HasValue) return HasSmtpServer.Value; @@ -221,7 +221,6 @@ namespace Umbraco.Core.Configuration /// Gets a value indicating whether umbraco is running in [debug mode]. /// /// true if [debug mode]; otherwise, false. - //fixme surely thsi doesn't belong here and it's also a web request context thing public static bool DebugMode { get diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs index e2f99a753b..2862a98a0e 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Configuration.Grid { List GetResult() { - // fixme - should use the common one somehow! + ignoring _appPlugins here! + // TODO should use the common one somehow! + ignoring _appPlugins here! var parser = new ManifestParser(_appCaches, Current.ManifestValidators, _logger); var editors = new List(); diff --git a/src/Umbraco.Core/Configuration/IGlobalSettings.cs b/src/Umbraco.Core/Configuration/IGlobalSettings.cs index a043f608f4..157103be9e 100644 --- a/src/Umbraco.Core/Configuration/IGlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/IGlobalSettings.cs @@ -19,17 +19,6 @@ namespace Umbraco.Core.Configuration /// The reserved paths. string ReservedPaths { get; } - /// - /// Gets the name of the content XML file. - /// - /// The content XML. - /// - /// Defaults to ~/App_Data/umbraco.config - /// - //fixme - remove - [Obsolete("This should not be used, need to remove the content xml cache")] - string ContentXmlFile { get; } - /// /// Gets the path to umbraco's root directory (/umbraco by default). /// diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 73df566a0f..05cb64325c 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -81,7 +81,7 @@ namespace Umbraco.Core.Configuration { try { - // fixme - this should live in its own independent file! NOT web.config! + // fixme/task - stop having version in web.config appSettings var value = ConfigurationManager.AppSettings["umbracoConfigurationStatus"]; return value.IsNullOrWhiteSpace() ? null : SemVersion.TryParse(value, out var semver) ? semver : null; } diff --git a/src/Umbraco.Core/ContentExtensions.cs b/src/Umbraco.Core/ContentExtensions.cs index 8c27c23604..dce97ed0e3 100644 --- a/src/Umbraco.Core/ContentExtensions.cs +++ b/src/Umbraco.Core/ContentExtensions.cs @@ -183,7 +183,7 @@ namespace Umbraco.Core // get a safe & clean filename filename = IOHelper.SafeFileName(filename); if (string.IsNullOrWhiteSpace(filename)) return; - filename = filename.ToLower(); // fixme - er... why? + filename = filename.ToLower(); SetUploadFile(content, propertyTypeAlias, filename, filestream, culture, segment); } diff --git a/src/Umbraco.Core/Deploy/IPreValueConnector.cs b/src/Umbraco.Core/Deploy/IPreValueConnector.cs index 15f9a9e619..2a8f4e622d 100644 --- a/src/Umbraco.Core/Deploy/IPreValueConnector.cs +++ b/src/Umbraco.Core/Deploy/IPreValueConnector.cs @@ -7,7 +7,7 @@ namespace Umbraco.Core.Deploy /// /// PreValues may contain values such as content identifiers, that would be local /// to one environment, and need to be converted in order to be deployed. - public interface IPreValueConnector // fixme this needs to change really + public interface IPreValueConnector // fixme/task: rename to IDataTypeConfigurationConnector + kill all "preValues" name usage { /// /// Gets the property editor aliases that the value converter supports by default. diff --git a/src/Umbraco.Core/Events/DeleteEventArgs.cs b/src/Umbraco.Core/Events/DeleteEventArgs.cs index 03f5c40ef8..07bbe562db 100644 --- a/src/Umbraco.Core/Events/DeleteEventArgs.cs +++ b/src/Umbraco.Core/Events/DeleteEventArgs.cs @@ -99,8 +99,8 @@ namespace Umbraco.Core.Events /// public IEnumerable DeletedEntities { - get { return EventObject; } - internal set { EventObject = value; } // fixme ouch! + get => EventObject; + internal set => EventObject = value; } /// diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs index b31b64e435..164b452f2c 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs @@ -34,7 +34,7 @@ namespace Umbraco.Core.Events private IMediaFileSystem _mediaFileSystem; - // fixme inject + // todo: inject private IMediaFileSystem MediaFileSystem => _mediaFileSystem ?? (_mediaFileSystem = Current.MediaFileSystem); } } diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs index 4c38c0b2ec..8a4df686ee 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs @@ -109,7 +109,6 @@ namespace Umbraco.Core.Events public Type[] SupersedeTypes { get; set; } } - // fixme // this is way too convoluted, the superceede attribute is used only on DeleteEventargs to specify // that it superceeds save, publish, move and copy - BUT - publish event args is also used for // unpublishing and should NOT be superceeded - so really it should not be managed at event args @@ -305,7 +304,6 @@ namespace Umbraco.Core.Events if (superceeding.Length == 0) return false; - // fixme see notes above // delete event args does NOT superceedes 'unpublished' event if (argType.IsGenericType && argType.GetGenericTypeDefinition() == typeof(PublishEventArgs<>) && infos.EventDefinition.EventName == "Unpublished") return false; @@ -317,9 +315,9 @@ namespace Umbraco.Core.Events var supercededBy = superceeding.FirstOrDefault(x => x.Item2.SupersedeTypes.Any(y => // superceeding a generic type which has the same generic type definition - // fixme no matter the generic type parameters? could be different? + // (but ... no matter the generic type parameters? could be different?) y.IsGenericTypeDefinition && y == argType.GetGenericTypeDefinition() - // or superceeding a non-generic type which is ... fixme how is this ever possible? argType *is* generic? + // or superceeding a non-generic type which is ... (but... how is this ever possible? argType *is* generic?) || y.IsGenericTypeDefinition == false && y == argType)); return supercededBy != null; } diff --git a/src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs b/src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs deleted file mode 100644 index 476789a30e..0000000000 --- a/src/Umbraco.Core/Events/ScopeLifetimeMessagesFactory.cs +++ /dev/null @@ -1,60 +0,0 @@ -// fixme - remove this file -//using System; -//using Umbraco.Core.Scoping; - -//namespace Umbraco.Core.Events -//{ -// /// -// /// Stores the instance of EventMessages in the current scope. -// /// -// internal class ScopeLifetimeMessagesFactory : IEventMessagesFactory -// { -// public const string ContextKey = "Umbraco.Core.Events.ScopeLifetimeMessagesFactory"; - -// // fixme for v8 that one will need to be entirely and massively refactored - -// private readonly IHttpContextAccessor _contextAccessor; -// private readonly IScopeProviderInternal _scopeProvider; - -// public static ScopeLifetimeMessagesFactory Current { get; private set; } - -// public ScopeLifetimeMessagesFactory(IHttpContextAccessor contextAccesor, IScopeProvider scopeProvider) -// { -// if (scopeProvider == null) throw new ArgumentNullException(nameof(scopeProvider)); -// if (scopeProvider is IScopeProviderInternal == false) throw new ArgumentException("Not IScopeProviderInternal.", nameof(scopeProvider)); -// _contextAccessor = contextAccesor ?? throw new ArgumentNullException(nameof(contextAccesor)); -// _scopeProvider = (IScopeProviderInternal) scopeProvider; -// Current = this; -// } - -// public EventMessages Get() -// { -// var messages = GetFromHttpContext(); -// if (messages != null) return messages; - -// var scope = _scopeProvider.GetAmbientOrNoScope(); -// return scope.Messages; -// } - -// public EventMessages GetFromHttpContext() -// { -// if (_contextAccessor == null || _contextAccessor.Value == null) return null; -// return (EventMessages)_contextAccessor.Value.Items[ContextKey]; -// } - -// public EventMessages TryGet() -// { -// var messages = GetFromHttpContext(); -// if (messages != null) return messages; - -// var scope = _scopeProvider.AmbientScope; -// return scope?.MessagesOrNull; -// } - -// public void Set(EventMessages messages) -// { -// if (_contextAccessor.Value == null) return; -// _contextAccessor.Value.Items[ContextKey] = messages; -// } -// } -//} diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 63a1259acb..38cb7df824 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -132,7 +132,7 @@ namespace Umbraco.Core.IO _scriptsFileSystem = new ShadowWrapper(scriptsFileSystem, "scripts", IsScoped); _mvcViewsFileSystem = new ShadowWrapper(mvcViewsFileSystem, "Views", IsScoped); - // fixme locking? + // todo - do we need a lock here? _shadowWrappers.Add(_macroPartialFileSystem); _shadowWrappers.Add(_partialViewsFileSystem); _shadowWrappers.Add(_stylesheetsFileSystem); diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs index 217ecb51b4..80f4c57ee3 100644 --- a/src/Umbraco.Core/IO/PhysicalFileSystem.cs +++ b/src/Umbraco.Core/IO/PhysicalFileSystem.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.IO if (directory == null) throw new InvalidOperationException("Could not get directory."); Directory.CreateDirectory(directory); // ensure it exists - if (stream.CanSeek) // fixme - what else? + if (stream.CanSeek) // todo - what if we cannot? stream.Seek(0, 0); using (var destination = (Stream) File.Create(fullPath)) diff --git a/src/Umbraco.Core/IO/SystemDirectories.cs b/src/Umbraco.Core/IO/SystemDirectories.cs index 8bea82ea4a..5bbf325c8c 100644 --- a/src/Umbraco.Core/IO/SystemDirectories.cs +++ b/src/Umbraco.Core/IO/SystemDirectories.cs @@ -36,7 +36,6 @@ namespace Umbraco.Core.IO public static string Umbraco => IOHelper.ReturnPath("umbracoPath", "~/umbraco"); - //fixme: remove this [Obsolete("Usercontrols are obsolete and code should be removed")] public static string UserControls => "~/usercontrols"; diff --git a/src/Umbraco.Core/IO/SystemFiles.cs b/src/Umbraco.Core/IO/SystemFiles.cs index 9a8e679229..511c39c98b 100644 --- a/src/Umbraco.Core/IO/SystemFiles.cs +++ b/src/Umbraco.Core/IO/SystemFiles.cs @@ -11,13 +11,10 @@ namespace Umbraco.Core.IO public static string TinyMceConfig => SystemDirectories.Config + "/tinyMceConfig.config"; - public static string DashboardConfig => SystemDirectories.Config + "/dashboard.config"; - public static string NotFoundhandlersConfig => SystemDirectories.Config + "/404handlers.config"; public static string FeedProxyConfig => string.Concat(SystemDirectories.Config, "/feedProxy.config"); - // fixme - kill public static string GetContentCacheXml(IGlobalSettings globalSettings) { switch (globalSettings.LocalTempStorageLocation) diff --git a/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs b/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs index 91cf471b0a..b9b3458bb4 100644 --- a/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs +++ b/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs @@ -17,8 +17,6 @@ namespace Umbraco.Core.Migrations.Expressions : base(expression) { } - // FIXME WTF is this and what is TNext here?! - public abstract ColumnDefinition GetColumnForType(); private ColumnDefinition Column => GetColumnForType(); diff --git a/src/Umbraco.Core/Migrations/IMigrationExpression.cs b/src/Umbraco.Core/Migrations/IMigrationExpression.cs index 8f950ab301..81063bd2da 100644 --- a/src/Umbraco.Core/Migrations/IMigrationExpression.cs +++ b/src/Umbraco.Core/Migrations/IMigrationExpression.cs @@ -5,7 +5,7 @@ /// public interface IMigrationExpression { - string Process(IMigrationContext context); // fixme kill + string Process(IMigrationContext context); // todo: remove that one? void Execute(); } } diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs index 4c68addebc..aa404ef90f 100644 --- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs +++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs @@ -31,7 +31,7 @@ namespace Umbraco.Core.Migrations.Install public List TableDefinitions { get; } - // fixme TableDefinitions are those that should be there, IndexDefinitions are those that... are in DB? + // todo what are these exactly? TableDefinitions are those that should be there, IndexDefinitions are those that... are in DB? internal List IndexDefinitions { get; } public List ValidTables { get; } diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs index 96e82d281d..34648d402a 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs @@ -40,8 +40,6 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 AlterColumn(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "languageId"); Create.Table().Do(); - - // fixme - data migration? } } } diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs index 5b6c913195..c6cad2eac1 100644 --- a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs +++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs @@ -13,8 +13,6 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { Create.Table().Do(); Create.Table().Do(); - - // fixme - data migration? } } } diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs index b0c786d4b0..2128dc9d78 100644 --- a/src/Umbraco.Core/Models/ContentBase.cs +++ b/src/Umbraco.Core/Models/ContentBase.cs @@ -128,14 +128,14 @@ namespace Umbraco.Core.Models /// /// Gets the enumeration of property groups for the entity. - /// fixme is a proxy, kill this + /// todo - remove this proxy method /// [IgnoreDataMember] public IEnumerable PropertyGroups => ContentTypeBase.CompositionPropertyGroups; /// /// Gets the numeration of property types for the entity. - /// fixme is a proxy, kill this + /// todo - remove this proxy method /// [IgnoreDataMember] public IEnumerable PropertyTypes => ContentTypeBase.CompositionPropertyTypes; diff --git a/src/Umbraco.Core/Models/ContentTypeBase.cs b/src/Umbraco.Core/Models/ContentTypeBase.cs index b6ea9f50a0..dadc3870b0 100644 --- a/src/Umbraco.Core/Models/ContentTypeBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeBase.cs @@ -431,7 +431,7 @@ namespace Umbraco.Core.Models /// PropertyTypes that are not part of a PropertyGroup /// [IgnoreDataMember] - //fixme should we mark this as EditorBrowsable hidden since it really isn't ever used? + //todo should we mark this as EditorBrowsable hidden since it really isn't ever used? internal PropertyTypeCollection PropertyTypeCollection => _noGroupPropertyTypes; /// diff --git a/src/Umbraco.Core/Models/Entities/EntitySlim.cs b/src/Umbraco.Core/Models/Entities/EntitySlim.cs index 30f64e8da5..3b8f997602 100644 --- a/src/Umbraco.Core/Models/Entities/EntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/EntitySlim.cs @@ -6,8 +6,6 @@ using Umbraco.Core.Exceptions; namespace Umbraco.Core.Models.Entities { - // fixme - changing the name of some properties that were in additionalData => must update corresponding javascript? - /// /// Implementation of for internal use. /// diff --git a/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs b/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs index 18e53a8a04..60e06c4977 100644 --- a/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs +++ b/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs @@ -33,9 +33,6 @@ namespace Umbraco.Core.Models.Entities public readonly PropertyInfo Trashed = ExpressionHelper.GetPropertyInfo(x => x.Trashed); } - // fixme - // ParentId, Path, Level and Trashed all should be consistent, and all derive from parentId, really - /// [DataMember] public string Name @@ -121,4 +118,4 @@ namespace Umbraco.Core.Models.Entities set => SetPropertyValueAndDetectChanges(value, ref _trashed, Selectors.Trashed); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/GridValue.cs b/src/Umbraco.Core/Models/GridValue.cs index 237385f3f4..c4a8b85b00 100644 --- a/src/Umbraco.Core/Models/GridValue.cs +++ b/src/Umbraco.Core/Models/GridValue.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Models public class GridSection { [JsonProperty("grid")] - public string Grid { get; set; } //fixme: what is this? + public string Grid { get; set; } //todo: what is this? [JsonProperty("rows")] public IEnumerable Rows { get; set; } @@ -48,7 +48,7 @@ namespace Umbraco.Core.Models public class GridArea { [JsonProperty("grid")] - public string Grid { get; set; } //fixme: what is this? + public string Grid { get; set; } //todo: what is this? [JsonProperty("controls")] public IEnumerable Controls { get; set; } diff --git a/src/Umbraco.Core/Models/IContent.cs b/src/Umbraco.Core/Models/IContent.cs index 056602f007..b3b4e03783 100644 --- a/src/Umbraco.Core/Models/IContent.cs +++ b/src/Umbraco.Core/Models/IContent.cs @@ -137,7 +137,7 @@ namespace Umbraco.Core.Models /// IEnumerable EditedCultures { get; } - // fixme - these two should move to some kind of service + // todo - these two should move to some kind of service /// /// Changes the for the current content object diff --git a/src/Umbraco.Core/Models/IContentBase.cs b/src/Umbraco.Core/Models/IContentBase.cs index fb3714cfc0..40a1c57097 100644 --- a/src/Umbraco.Core/Models/IContentBase.cs +++ b/src/Umbraco.Core/Models/IContentBase.cs @@ -137,8 +137,6 @@ namespace Umbraco.Core.Models /// void CopyFrom(IContent other, string culture = "*"); - // fixme validate published cultures? - /// /// Validates the content item's properties pass variant rules /// diff --git a/src/Umbraco.Core/Models/IContentTypeComposition.cs b/src/Umbraco.Core/Models/IContentTypeComposition.cs index 36ace19f0f..3113f795cd 100644 --- a/src/Umbraco.Core/Models/IContentTypeComposition.cs +++ b/src/Umbraco.Core/Models/IContentTypeComposition.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.Models /// /// Gets or sets the content types that compose this content type. /// - //fixme: we should be storing key references, not the object else we are caching way too much + //todo: we should be storing key references, not the object else we are caching way too much IEnumerable ContentTypeComposition { get; set; } /// diff --git a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs index dcf86a0b42..13a13e9dff 100644 --- a/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs +++ b/src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs @@ -67,7 +67,7 @@ namespace Umbraco.Core.Models.Identity _startContentIds = new int[] { }; _groups = new IReadOnlyUserGroup[] { }; _allowedSections = new string[] { }; - _culture = Current.Configs.Global().DefaultUILanguage; //fixme inject somehow? + _culture = Current.Configs.Global().DefaultUILanguage; //todo inject _groups = new IReadOnlyUserGroup[0]; _roles = new ObservableCollection>(); _roles.CollectionChanged += _roles_CollectionChanged; @@ -84,7 +84,7 @@ namespace Umbraco.Core.Models.Identity _startContentIds = new int[] { }; _groups = new IReadOnlyUserGroup[] { }; _allowedSections = new string[] { }; - _culture = Current.Configs.Global().DefaultUILanguage; //fixme inject somehow? + _culture = Current.Configs.Global().DefaultUILanguage; //todo inject _groups = groups.ToArray(); _roles = new ObservableCollection>(_groups.Select(x => new IdentityUserRole { diff --git a/src/Umbraco.Core/Models/MediaExtensions.cs b/src/Umbraco.Core/Models/MediaExtensions.cs index f510377c09..5cc4cc8fe5 100644 --- a/src/Umbraco.Core/Models/MediaExtensions.cs +++ b/src/Umbraco.Core/Models/MediaExtensions.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Models var val = media.Properties[propertyType]; if (val == null) return string.Empty; - //fixme doesn't take into account variants + //todo would need to be adjusted to variations, when media become variants var jsonString = val.GetValue() as string; if (jsonString == null) return string.Empty; diff --git a/src/Umbraco.Core/Models/Membership/User.cs b/src/Umbraco.Core/Models/Membership/User.cs index 650aa6cb29..942c71f0c6 100644 --- a/src/Umbraco.Core/Models/Membership/User.cs +++ b/src/Umbraco.Core/Models/Membership/User.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Models.Membership { SessionTimeout = 60; _userGroups = new HashSet(); - _language = Current.Configs.Global().DefaultUILanguage; //fixme inject somehow? + _language = Current.Configs.Global().DefaultUILanguage; //todo inject _isApproved = true; _isLockedOut = false; _startContentIds = new int[] { }; diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs index f14fe47bfe..ac460ca34c 100644 --- a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs +++ b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs @@ -26,19 +26,19 @@ namespace Umbraco.Core.Models.Packaging public string PackageView { get; set; } public string IconUrl { get; set; } - public string Actions { get; set; } //fixme: Should we make this strongly typed to IEnumerable ? + public string Actions { get; set; } //todo: Should we make this strongly typed to IEnumerable ? public PreInstallWarnings Warnings { get; set; } = new PreInstallWarnings(); public List Files { get; set; } = new List(); - public IEnumerable Macros { get; set; } //fixme: make strongly typed - public IEnumerable Templates { get; set; } //fixme: make strongly typed - public IEnumerable Stylesheets { get; set; } //fixme: make strongly typed - public IEnumerable DataTypes { get; set; } //fixme: make strongly typed - public IEnumerable Languages { get; set; } //fixme: make strongly typed - public IEnumerable DictionaryItems { get; set; } //fixme: make strongly typed - public IEnumerable DocumentTypes { get; set; } //fixme: make strongly typed + public IEnumerable Macros { get; set; } //todo: make strongly typed + public IEnumerable Templates { get; set; } //todo: make strongly typed + public IEnumerable Stylesheets { get; set; } //todo: make strongly typed + public IEnumerable DataTypes { get; set; } //todo: make strongly typed + public IEnumerable Languages { get; set; } //todo: make strongly typed + public IEnumerable DictionaryItems { get; set; } //todo: make strongly typed + public IEnumerable DocumentTypes { get; set; } //todo: make strongly typed public IEnumerable Documents { get; set; } } } diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs index 0c71544111..5e45475dd2 100644 --- a/src/Umbraco.Core/Models/Property.cs +++ b/src/Umbraco.Core/Models/Property.cs @@ -347,7 +347,7 @@ namespace Umbraco.Core.Models /// internal bool IsValid(string culture = "*", string segment = "*") { - //fixme - validating values shouldn't be done here, this calls in to IsValidValue + //todo - validating values shouldn't be done here, this calls in to IsValidValue culture = culture.NullOrWhiteSpaceAsNull(); segment = segment.NullOrWhiteSpaceAsNull(); @@ -388,7 +388,7 @@ namespace Umbraco.Core.Models /// True is property value is valid, otherwise false private bool IsValidValue(object value) { - //fixme this shouldn't exist here, the model itself shouldn't be responsible for it's own validation and this requires singleton access + //todo - this shouldn't exist here, the model itself shouldn't be responsible for it's own validation and this requires singleton access return PropertyType.IsPropertyValueValid(value); } diff --git a/src/Umbraco.Core/Models/PropertyCollection.cs b/src/Umbraco.Core/Models/PropertyCollection.cs index fe2c34f042..ef56ce4a4c 100644 --- a/src/Umbraco.Core/Models/PropertyCollection.cs +++ b/src/Umbraco.Core/Models/PropertyCollection.cs @@ -97,7 +97,7 @@ namespace Umbraco.Core.Models /// internal new void Add(Property property) { - lock (_addLocker) // fixme - why are we locking here and not everywhere else?! + lock (_addLocker) // todo - why are we locking here and not everywhere else?! { var key = GetKeyForItem(property); if (key != null) diff --git a/src/Umbraco.Core/Models/PropertyGroupCollection.cs b/src/Umbraco.Core/Models/PropertyGroupCollection.cs index c5768c66db..8b493e3118 100644 --- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs +++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Models { private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim(); - //fixme: this doesn't seem to be used anywhere + //todo: this doesn't seem to be used anywhere internal Action OnAdd; internal PropertyGroupCollection() diff --git a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs index 39172fff34..c0dcddc6ae 100644 --- a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs +++ b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Models /// public static class PropertyTagsExtensions { - // fixme inject? + // todo: inject private static PropertyEditorCollection PropertyEditors => Current.PropertyEditors; private static IDataTypeService DataTypeService => Current.Services.DataTypeService; diff --git a/src/Umbraco.Core/Models/PropertyType.cs b/src/Umbraco.Core/Models/PropertyType.cs index d44e7d464f..6373dbec9a 100644 --- a/src/Umbraco.Core/Models/PropertyType.cs +++ b/src/Umbraco.Core/Models/PropertyType.cs @@ -378,14 +378,14 @@ namespace Umbraco.Core.Models } - //fixme - this and other value validation methods should be a service level (not a model) thing. Changing this to internal for now + //todo - this and other value validation methods should be a service level (not a model) thing. Changing this to internal for now /// /// Determines whether a value is valid for this property type. /// internal bool IsPropertyValueValid(object value) { - var editor = Current.PropertyEditors[_propertyEditorAlias]; // fixme inject? - var configuration = Current.Services.DataTypeService.GetDataType(_dataTypeId).Configuration; // fixme inject? + var editor = Current.PropertyEditors[_propertyEditorAlias]; // todo inject + var configuration = Current.Services.DataTypeService.GetDataType(_dataTypeId).Configuration; // todo inject var valueEditor = editor.GetValueEditor(configuration); return !valueEditor.Validate(value, Mandatory, ValidationRegExp).Any(); } diff --git a/src/Umbraco.Core/Models/PropertyTypeCollection.cs b/src/Umbraco.Core/Models/PropertyTypeCollection.cs index 6053a6a5bf..6753ee7532 100644 --- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs +++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Models [IgnoreDataMember] private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim(); - //fixme: This doesn't seem to be used + //todo: This doesn't seem to be used [IgnoreDataMember] internal Action OnAdd; @@ -81,7 +81,7 @@ namespace Umbraco.Core.Models { item.IsPublishing = IsPublishing; - // fixme redo this entirely!!! + // todo this is not pretty and should be refactored try { _addLocker.EnterWriteLock(); diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs index 4e1ce7ddd7..c5fa0330f2 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs @@ -153,7 +153,7 @@ namespace Umbraco.Core.Models.PublishedContent /// bool IsDraft(string culture = null); - // fixme - consider having an IsPublished flag too + // fixme/task - consider having an IsPublished flag too // so that when IsDraft is true, we can check whether there is a published version? #endregion diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs deleted file mode 100644 index dc17265bb9..0000000000 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentEnumerable.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace Umbraco.Core.Models.PublishedContent -{ - // fixme imported from 7.6 needs better explaination of what it is - - /// - /// The published content enumerable, this model is to allow ToString to be overriden for value converters to support legacy requests for string values - /// - public class PublishedContentEnumerable : IEnumerable - { - /// - /// The items in the collection - /// - private readonly IEnumerable _items; - - /// - /// Initializes a new instance of the class. - /// - /// - /// The published content items - /// - public PublishedContentEnumerable(IEnumerable publishedContent) - { - _items = publishedContent ?? throw new ArgumentNullException(nameof(publishedContent)); - } - - /// - /// The ToString method to convert the objects back to CSV - /// - /// - /// The . - /// - public override string ToString() - { - return string.Join(",", _items.Select(x => x.Id)); - } - - /// - /// The get enumerator. - /// - /// - /// The . - /// - public IEnumerator GetEnumerator() - { - return _items.GetEnumerator(); - } - - /// - /// The get enumerator. - /// - /// - /// The . - /// - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs index f1937c1c0c..1d168aad1d 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs @@ -85,7 +85,7 @@ namespace Umbraco.Core.Models.PublishedContent } } - // fixme - this list somehow also exists in constants, see memberTypeRepository => remove duplicate! + // todo - this list somehow also exists in constants, see memberTypeRepository => remove duplicate! private static readonly Dictionary BuiltinMemberProperties = new Dictionary { { "Email", (Constants.DataTypes.Textbox, Constants.PropertyEditors.Aliases.TextBox) }, @@ -147,7 +147,7 @@ namespace Umbraco.Core.Models.PublishedContent return -1; } - // virtual for unit tests - fixme explain + // virtual for unit tests - todo explain why /// /// Gets a property type. /// @@ -157,7 +157,7 @@ namespace Umbraco.Core.Models.PublishedContent return GetPropertyType(index); } - // virtual for unit tests - fixme explain + // virtual for unit tests - todo explain why /// /// Gets a property type. /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs index e019f9a5d1..1a99076b2c 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs @@ -12,7 +12,7 @@ namespace Umbraco.Core.Models.PublishedContent /// if the property type changes, then a new class needs to be created. public class PublishedPropertyType { - //fixme - API design review, should this be an interface? + //todo - API design review, should this be an interface? private readonly IPublishedModelFactory _publishedModelFactory; private readonly PropertyValueConverterCollection _propertyValueConverters; diff --git a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs index 9eb4c3f90f..bfbde592b5 100644 --- a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs +++ b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs @@ -14,13 +14,13 @@ namespace Umbraco.Core public const string Node = /*TableNamePrefix*/ "umbraco" + "Node"; public const string NodeData = /*TableNamePrefix*/ "cms" + "ContentNu"; - public const string NodeXml = /*TableNamePrefix*/ "cms" + "ContentXml"; - public const string NodePreviewXml = /*TableNamePrefix*/ "cms" + "PreviewXml"; // fixme dbfix kill merge with ContentXml + public const string NodeXml = /*TableNamePrefix*/ "cms" + "ContentXml"; // todo get rid of these with the xml cache + public const string NodePreviewXml = /*TableNamePrefix*/ "cms" + "PreviewXml"; // todo get rid of these with the xml cache - public const string ContentType = /*TableNamePrefix*/ "cms" + "ContentType"; // fixme dbfix rename and split uElementType, uDocumentType + public const string ContentType = /*TableNamePrefix*/ "cms" + "ContentType"; public const string ContentChildType = /*TableNamePrefix*/ "cms" + "ContentTypeAllowedContentType"; - public const string DocumentType = /*TableNamePrefix*/ "cms" + "DocumentType"; // fixme dbfix must rename corresponding DTO - public const string ElementTypeTree = /*TableNamePrefix*/ "cms" + "ContentType2ContentType"; // fixme dbfix why can't we just use uNode for this? + public const string DocumentType = /*TableNamePrefix*/ "cms" + "DocumentType"; + public const string ElementTypeTree = /*TableNamePrefix*/ "cms" + "ContentType2ContentType"; public const string DataType = TableNamePrefix + "DataType"; public const string Template = /*TableNamePrefix*/ "cms" + "Template"; diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs b/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs index 1dca820a6c..ada26358dc 100644 --- a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs @@ -33,10 +33,10 @@ namespace Umbraco.Core.Persistence.Dtos [Column("name")] public string Name { get; set; } - [Column("date")] // fixme: db rename to 'updateDate' + [Column("date")] // todo: db rename to 'updateDate' public DateTime UpdateDate { get; set; } - [Column("availableUserId")] // fixme: db rename to 'updateDate' + [Column("availableUserId")] // todo: db rename to 'updateDate' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UpdateUserId { get => _updateUserId == 0 ? null : _updateUserId; set => _updateUserId = value; } //return null if zero diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs b/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs index a13bf921d9..287e812211 100644 --- a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs @@ -21,16 +21,16 @@ namespace Umbraco.Core.Persistence.Dtos [ForeignKey(typeof(ContentDto))] public int NodeId { get; set; } - [Column("versionDate")] // fixme: db rename to 'updateDate' + [Column("versionDate")] // todo: db rename to 'updateDate' [Constraint(Default = SystemMethods.CurrentDateTime)] public DateTime VersionDate { get; set; } - [Column("userId")] // fixme: db rename to 'updateUserId' + [Column("userId")] // todo: db rename to 'updateUserId' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UserId { get => _userId == 0 ? null : _userId; set => _userId = value; } //return null if zero - //fixme - we need an index on this it is used almost always in querying and sorting + //todo - we need an index on this it is used almost always in querying and sorting [Column("current")] public bool Current { get; set; } diff --git a/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs b/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs index cc51ab19ee..a0e526b62e 100644 --- a/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Persistence.Dtos public int NodeId { get; set; } [Column("propertyEditorAlias")] - public string EditorAlias { get; set; } // fixme - length?! + public string EditorAlias { get; set; } // todo should this have a length [Column("dbType")] [Length(50)] diff --git a/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs b/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs index 56da821360..8f50891b34 100644 --- a/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs @@ -45,7 +45,7 @@ namespace Umbraco.Core.Persistence.Dtos [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Trashed")] public bool Trashed { get; set; } - [Column("nodeUser")] // fixme: db rename to 'createUserId' + [Column("nodeUser")] // todo: db rename to 'createUserId' [ForeignKey(typeof(UserDto))] [NullSetting(NullSetting = NullSettings.Null)] public int? UserId { get => _userId == 0 ? null : _userId; set => _userId = value; } //return null if zero @@ -54,7 +54,7 @@ namespace Umbraco.Core.Persistence.Dtos [NullSetting(NullSetting = NullSettings.Null)] public string Text { get; set; } - [Column("nodeObjectType")] // fixme: db rename to 'objectType' + [Column("nodeObjectType")] // todo: db rename to 'objectType' [NullSetting(NullSetting = NullSettings.Null)] [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_ObjectType")] public Guid? NodeObjectType { get; set; } diff --git a/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs b/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs index 6705153ffb..dabac9dabf 100644 --- a/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs +++ b/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs @@ -16,22 +16,4 @@ namespace Umbraco.Core.Persistence.Dtos [ForeignKey(typeof(UserGroupDto))] public int UserGroupId { get; set; } } - - [TableName(Constants.DatabaseSchema.Tables.User2UserGroup)] - [ExplicitColumns] - internal class User2UserGroupReadOnlyDto - { - [Column("userId")] - [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_user2userGroup", OnColumns = "userId, userGroupId")] - [ForeignKey(typeof(UserDto))] - public int UserId { get; set; } - - [Column("userGroupId")] - [ForeignKey(typeof(UserGroupDto))] - public int UserGroupId { get; set; } - - [ResultColumn] - [Reference(ReferenceType.Foreign)] // fixme - public UserGroupDto UserGroupDto { get; set; } - } } diff --git a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs index 7fe1d44921..7548574735 100644 --- a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs @@ -49,7 +49,7 @@ namespace Umbraco.Core.Persistence.Factories content.Published = dto.Published; content.Edited = dto.Edited; - // fixme - shall we get published infos or not? + // todo - shall we get published infos or not? //if (dto.Published) if (publishedVersionDto != null) { @@ -89,7 +89,7 @@ namespace Umbraco.Core.Persistence.Factories content.Key = nodeDto.UniqueId; content.VersionId = contentVersionDto.Id; - // fixme missing names? + // todo missing names? content.Path = nodeDto.Path; content.Level = nodeDto.Level; @@ -130,7 +130,7 @@ namespace Umbraco.Core.Persistence.Factories content.Key = nodeDto.UniqueId; content.VersionId = contentVersionDto.Id; - // fixme missing names? + // todo missing names? content.Path = nodeDto.Path; content.Level = nodeDto.Level; @@ -294,7 +294,7 @@ namespace Umbraco.Core.Persistence.Factories private static MediaVersionDto BuildMediaVersionDto(IMedia entity, ContentDto contentDto) { // try to get a path from the string being stored for media - // fixme - only considering umbracoFile ?! + // todo - only considering umbracoFile TryMatch(entity.GetValue("umbracoFile"), out var path); @@ -309,11 +309,11 @@ namespace Umbraco.Core.Persistence.Factories return dto; } - // fixme - this should NOT be here?! + // todo - this should NOT be here?! // more dark magic ;-( internal static bool TryMatch(string text, out string path) { - //fixme: In v8 we should allow exposing this via the property editor in a much nicer way so that the property editor + // In v8 we should allow exposing this via the property editor in a much nicer way so that the property editor // can tell us directly what any URL is for a given property if it contains an asset path = null; diff --git a/src/Umbraco.Core/Persistence/LocalDb.cs b/src/Umbraco.Core/Persistence/LocalDb.cs index 6eb9cbc443..11fa52fa48 100644 --- a/src/Umbraco.Core/Persistence/LocalDb.cs +++ b/src/Umbraco.Core/Persistence/LocalDb.cs @@ -317,8 +317,8 @@ namespace Umbraco.Core.Persistence if (dbname == "master" || dbname == "tempdb" || dbname == "model" || dbname == "msdb") continue; - // fixme - shall we deal with stale databases? - // fixme - is it always ok to assume file names? + // todo - shall we deal with stale databases? + // todo - is it always ok to assume file names? //var mdf = database.Value; //var ldf = mdf.Replace(".mdf", "_log.ldf"); //if (staleOnly && File.Exists(mdf) && File.Exists(ldf)) diff --git a/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs b/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs deleted file mode 100644 index 40fce123b7..0000000000 --- a/src/Umbraco.Core/Persistence/Mappers/UserTypeMapper.cs +++ /dev/null @@ -1,28 +0,0 @@ -//using System.Collections.Concurrent; -//using Umbraco.Core.Models.Membership; -//using Umbraco.Core.Models.Rdbms; - -//namespace Umbraco.Core.Persistence.Mappers -//{ -// /// -// /// Represents a to DTO mapper used to translate the properties of the public api -// /// implementation to that of the database's DTO as sql: [tableName].[columnName]. -// /// -// [MapperFor(typeof(IUserType))] -// [MapperFor(typeof(UserType))] -// public sealed class UserTypeMapper : BaseMapper -// { -// private static readonly ConcurrentDictionary PropertyInfoCacheInstance = new ConcurrentDictionary(); - -// internal override ConcurrentDictionary PropertyInfoCache => PropertyInfoCacheInstance; - -// protected override void BuildMap() -// { -// CacheMap(src => src.Id, dto => dto.Id); -// CacheMap(src => src.Alias, dto => dto.Alias); -// CacheMap(src => src.Name, dto => dto.Name); -// CacheMap(src => src.Permissions, dto => dto.DefaultPermissions); -// } -// } -//} -// fixme remoev this file diff --git a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs index 77b412ef2b..b844aff72d 100644 --- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs +++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs @@ -181,8 +181,8 @@ namespace Umbraco.Core.Persistence using (var command = database.CreateCommand(database.Connection, CommandType.TableDirect, string.Empty)) { command.CommandText = pocoData.TableInfo.TableName; - command.CommandType = CommandType.TableDirect; // fixme - why repeat? - // fixme - not supporting transactions? + command.CommandType = CommandType.TableDirect; // todo - why repeat? + // todo - not supporting transactions? //cmd.Transaction = GetTypedTransaction(db.Connection.); var count = 0; diff --git a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs index b81e68e567..7f9f881d4b 100644 --- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs +++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs @@ -105,7 +105,7 @@ namespace Umbraco.Core.Persistence if (poco == null) throw new ArgumentNullException(nameof(poco)); - // fixme - NPoco has a Save method that works with the primary key + // todo - NPoco has a Save method that works with the primary key // in any case, no point trying to update if there's no primary key! // try to update diff --git a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs index 7aa8b707be..d85fafa768 100644 --- a/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs +++ b/src/Umbraco.Core/Persistence/NPocoSqlExtensions.cs @@ -496,7 +496,7 @@ namespace Umbraco.Core.Persistence public static Sql On(this Sql.SqlJoinClause sqlJoin, Expression> leftField, Expression> rightField) { - // fixme - ugly - should define on SqlContext! + // todo - ugly - should define on SqlContext! var xLeft = new Sql(sqlJoin.SqlContext).Columns(leftField); var xRight = new Sql(sqlJoin.SqlContext).Columns(rightField); diff --git a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs index 16bfc9b164..64b3c91e50 100644 --- a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs +++ b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs @@ -10,7 +10,8 @@ using Umbraco.Core.Composing; namespace Umbraco.Core.Persistence.Querying { - // fixme.npoco - are we basically duplicating entire parts of NPoco just because of SqlSyntax ?! + // todo - are we basically duplicating entire parts of NPoco just because of SqlSyntax ?! + // try to use NPoco's version ! /// /// An expression tree parser to create SQL statements and SQL parameters based on a strongly typed expression. diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs index ba56c17087..3cf9f50e40 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected ILanguageRepository LanguageRepository { get; } - protected PropertyEditorCollection PropertyEditors => Current.PropertyEditors; // fixme inject + protected PropertyEditorCollection PropertyEditors => Current.PropertyEditors; // todo inject #region Versions @@ -73,7 +73,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // deletes a specific version public virtual void DeleteVersion(int versionId) { - // fixme test object node type? + // todo test object node type? // get the version we want to delete var template = SqlContext.Templates.Get("Umbraco.Core.VersionableRepository.GetVersion", tsql => @@ -95,7 +95,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // deletes all versions of an entity, older than a date. public virtual void DeleteVersions(int nodeId, DateTime versionDate) { - // fixme test object node type? + // todo test object node type? // get the versions we want to delete, excluding the current one var template = SqlContext.Templates.Get("Umbraco.Core.VersionableRepository.GetVersions", tsql => @@ -240,7 +240,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - // FIXME should we do it when un-publishing? or? + // todo should we do it when un-publishing? or? /// /// Clears tags for an item. /// @@ -277,7 +277,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var (dbfield, _) = SqlContext.VisitDto(x => x.NodeId); if (ordering.IsCustomField || !ordering.OrderBy.InvariantEquals("id")) { - psql.OrderBy(GetAliasedField(dbfield, sql)); // fixme why aliased? + psql.OrderBy(GetAliasedField(dbfield, sql)); } // create prepared sql @@ -374,7 +374,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return GetAliasedField(SqlSyntax.GetFieldName(x => x.Text), sql); // "variantName" alias is defined in DocumentRepository.GetBaseQuery - // fixme - what if it is NOT a document but a ... media or whatever? + // todo - what if it is NOT a document but a ... media or whatever? // previously, we inserted the join+select *here* so we were sure to have it, // but now that's not the case anymore! return "variantName"; @@ -620,7 +620,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region UnitOfWork Events - //fixme: The reason these events are in the repository is for legacy, the events should exist at the service + // todo: The reason these events are in the repository is for legacy, the events should exist at the service // level now since we can fire these events within the transaction... so move the events to service level public class ScopedEntityEventArgs : EventArgs @@ -736,8 +736,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public T Content { get; set; } } - // fixme copied from 7.6 - /// /// For Paging, repositories must support returning different query for the query type specified /// @@ -745,207 +743,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// protected abstract Sql GetBaseQuery(QueryType queryType); - /* - internal class DocumentDefinitionCollection : KeyedCollection - { - private readonly bool _includeAllVersions; - - /// - /// Constructor specifying if all versions should be allowed, in that case the key for the collection becomes the versionId (GUID) - /// - /// - public DocumentDefinitionCollection(bool includeAllVersions = false) - { - _includeAllVersions = includeAllVersions; - } - - protected override ValueType GetKeyForItem(DocumentDefinition item) - { - return _includeAllVersions ? (ValueType)item.Version : item.Id; - } - - /// - /// if this key already exists if it does then we need to check - /// if the existing item is 'older' than the new item and if that is the case we'll replace the older one - /// - /// - /// - public bool AddOrUpdate(DocumentDefinition item) - { - //if we are including all versions then just add, we aren't checking for latest - if (_includeAllVersions) - { - Add(item); - return true; - } - - if (Dictionary == null) - { - Add(item); - return true; - } - - var key = GetKeyForItem(item); - if (TryGetValue(key, out DocumentDefinition found)) - { - //it already exists and it's older so we need to replace it - if (item.VersionId <= found.VersionId) return false; - - var currIndex = Items.IndexOf(found); - if (currIndex == -1) - throw new IndexOutOfRangeException("Could not find the item in the list: " + found.Version); - - //replace the current one with the newer one - SetItem(currIndex, item); - return true; - } - - Add(item); - return true; - } - - public bool TryGetValue(ValueType key, out DocumentDefinition val) - { - if (Dictionary != null) - return Dictionary.TryGetValue(key, out val); - - val = null; - return false; - } - } - - /// - /// Implements a Guid comparer that respect the Sql engine ordering. - /// - /// - /// MySql sorts Guids as strings, but MSSQL sorts guids based on a weird byte sections order - /// This comparer compares Guids using the corresponding Sql syntax method, ie the method of the underlying Sql engine. - /// see http://stackoverflow.com/questions/7810602/sql-server-guid-sort-algorithm-why - /// see https://blogs.msdn.microsoft.com/sqlprogrammability/2006/11/06/how-are-guids-compared-in-sql-server-2005/ - /// - private class DocumentDefinitionComparer : IComparer - { - private readonly bool _mySql; - - public DocumentDefinitionComparer(ISqlSyntaxProvider sqlSyntax) - { - _mySql = sqlSyntax is MySqlSyntaxProvider; - } - - public int Compare(Guid x, Guid y) - { - // MySql sorts Guids as string (ie normal, same as .NET) whereas MSSQL - // sorts them on a weird byte sections order - return _mySql ? x.CompareTo(y) : new SqlGuid(x).CompareTo(new SqlGuid(y)); - } - } - - internal class DocumentDefinition - { - /// - /// Initializes a new instance of the class. - /// - public DocumentDefinition(DocumentDto dto, IContentTypeComposition composition) - { - DocumentDto = dto; - ContentVersionDto = dto.ContentVersionDto; - Composition = composition; - } - - public DocumentDefinition(ContentVersionDto dto, IContentTypeComposition composition) - { - ContentVersionDto = dto; - Composition = composition; - } - - public DocumentDto DocumentDto { get; } - public ContentVersionDto ContentVersionDto { get; } - - public int Id => ContentVersionDto.NodeId; - - public Guid Version => DocumentDto?.VersionId ?? ContentVersionDto.VersionId; - - // This is used to determien which version is the most recent - public int VersionId => ContentVersionDto.Id; - - public DateTime VersionDate => ContentVersionDto.VersionDate; - - public DateTime CreateDate => ContentVersionDto.ContentDto.NodeDto.CreateDate; - - public IContentTypeComposition Composition { get; set; } - } - - // Represents a query that may contain paging information. - internal class PagingSqlQuery - { - // the original query sql - public Sql QuerySql { get; } - - public PagingSqlQuery(Sql querySql) - { - QuerySql = querySql; - } - - protected PagingSqlQuery(Sql querySql, int pageSize) - : this(querySql) - { - HasPaging = pageSize > 0; - } - - // whether the paging query is actually paging - public bool HasPaging { get; } - - // the paging sql - public virtual Sql BuildPagedQuery(string columns) - { - throw new InvalidOperationException("This query has no paging information."); - } - } - - /// - /// Represents a query that may contain paging information. - /// - /// - internal class PagingSqlQuery : PagingSqlQuery // fixme what's here? - { - private readonly Database _db; - private readonly long _pageIndex; - private readonly int _pageSize; - - // fixme - don't capture a db instance here! - // instead, should have an extension method, so one can do - // sql = db.BuildPageQuery(pagingQuery, columns) - public PagingSqlQuery(Database db, Sql querySql, long pageIndex, int pageSize) - : base(querySql, pageSize) - { - _db = db; - _pageIndex = pageIndex; - _pageSize = pageSize; - } - - /// - /// Creates a paged query based on the original query and subtitutes the selectColumns specified - /// - /// - /// - // build a page query - public override Sql BuildPagedQuery(string columns) - { - if (HasPaging == false) - throw new InvalidOperationException("This query has no paging information."); - - // substitutes the original "SELECT ..." with "SELECT {columns}" ie only - // select the specified columns - fixme why? - var sql = $"SELECT {columns} {QuerySql.SQL.Substring(QuerySql.SQL.IndexOf("FROM", StringComparison.Ordinal))}"; - - // and then build the page query - var args = QuerySql.Arguments; - _db.BuildPageQueries(_pageIndex * _pageSize, _pageSize, sql, ref args, out string unused, out string sqlPage); - return new Sql(sqlPage, args); - } - } - */ - #endregion #region Utilities diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs index f608e2968d..773716b401 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs @@ -79,7 +79,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var translator = new SqlTranslator(sqlClause, query); var sql = translator.Translate(); - // fixme - insane! GetBaseQuery does not even return a proper??? oh well... var dtos = Database.Fetch(sql); return diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index 6404880a2e..45532fc06a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -103,7 +103,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .On(left => left.DataTypeId, right => right.NodeId); var translator = new SqlTranslator(sqlClause, query); - // fixme v8 are we sorting only for 7.6 relators? + var sql = translator.Translate() .OrderBy(x => x.PropertyTypeGroupId); @@ -764,7 +764,6 @@ AND umbracoNode.id <> @id", { // note: important to use SqlNullableEquals for nullable types, cannot directly compare language identifiers - // fixme - should we batch then? var whereInArgsCount = propertyTypeIds.Count + (contentTypeIds?.Count ?? 0); if (whereInArgsCount > 2000) throw new NotSupportedException("Too many property/content types."); @@ -903,7 +902,6 @@ AND umbracoNode.id <> @id", { // note: important to use SqlNullableEquals for nullable types, cannot directly compare language identifiers // - // fixme - should we batch then? var whereInArgsCount = propertyTypeIds.Count + (contentTypeIds?.Count ?? 0); if (whereInArgsCount > 2000) throw new NotSupportedException("Too many property/content types."); diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs index 28d4262763..f4f0da8bee 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { private readonly Lazy _editors; - // fixme temp fixing circular dependencies with LAZY but is this the right place? + // fixme/task - get rid of Lazy injection and fix circular dependencies public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger) : base(scopeAccessor, cache, logger) { diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs index 31c08f9124..0011a384ab 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs @@ -90,7 +90,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private void AddGetByQueryOrderBy(Sql sql) { - sql // fixme why - this should be Path + sql .OrderBy(x => x.Level) .OrderBy(x => x.SortOrder); } @@ -148,7 +148,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .On((left, right) => left.Id == right.Id && right.Published, "pcv", "pdv"), "pcv") .On((left, right) => left.NodeId == right.NodeId, aliasRight: "pcv") - //fixme - should we be joining this when the query type is not single/many? + // todo - should we be joining this when the query type is not single/many? // left join on optional culture variation //the magic "[[[ISOCODE]]]" parameter value will be replaced in ContentRepositoryBase.GetPage() by the actual ISO code .LeftJoin(nested => @@ -171,13 +171,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return sql; } - // fixme - kill, eventually protected override Sql GetBaseQuery(bool isCount) { return GetBaseQuery(isCount ? QueryType.Count : QueryType.Single); } - // fixme - kill, eventually // ah maybe not, that what's used for eg Exists in base repo protected override string GetBaseWhereClause() { @@ -251,7 +249,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // raise event first else potential FK issues OnUowRemovingVersion(new ScopedVersionEventArgs(AmbientScope, id, versionId)); - // fixme - syntax + ... Database.Delete("WHERE versionId = @versionId", new { versionId }); Database.Delete("WHERE id = @versionId", new { versionId }); Database.Delete("WHERE id = @versionId", new { versionId }); @@ -263,7 +260,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override void PersistNewItem(IContent entity) { - // fixme - stop doing this - sort out IContent vs Content + // fixme/task - sort out IContent vs Content // however, it's not just so we have access to AddingEntity // there are tons of things at the end of the methods, that can only work with a true Content // and basically, the repository requires a Content, not an IContent @@ -280,7 +277,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement SanitizeNames(content, publishing); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -439,7 +436,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override void PersistUpdatedItem(IContent entity) { - // fixme - stop doing this - sort out IContent vs Content // however, it's not just so we have access to AddingEntity // there are tons of things at the end of the methods, that can only work with a true Content // and basically, the repository requires a Content, not an IContent @@ -451,7 +447,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return; // no change to save, do nothing, don't even update dates // whatever we do, we must check that we are saving the current version - // fixme maybe we can just fetch Current (bool) var version = Database.Fetch(SqlContext.Sql().Select().From().Where(x => x.Id == content.VersionId)).FirstOrDefault(); if (version == null || !version.Current) throw new InvalidOperationException("Cannot save a non-current version."); @@ -471,7 +466,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement SanitizeNames(content, publishing); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order @@ -550,7 +545,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement edited = true; (editedCultures ?? (editedCultures = new HashSet(StringComparer.OrdinalIgnoreCase))).Add(culture); - // fixme - change tracking + // todo - change tracking // at the moment, we don't do any dirty tracking on property values, so we don't know whether the // culture has just been edited or not, so we don't update its update date - that date only changes // when the name is set, and it all works because the controller does it - but, if someone uses a @@ -566,7 +561,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var deleteDocumentVariations = Sql().Delete().Where(x => x.NodeId == content.Id); Database.Execute(deleteDocumentVariations); - // fixme NPoco InsertBulk issue? + // todo NPoco InsertBulk issue? // we should use the native NPoco InsertBulk here but it causes problems (not sure exaclty all scenarios) // but by using SQL Server and updating a variants name will cause: Unable to cast object of type // 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'. @@ -628,7 +623,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } // note re. tags: explicitly unpublished entities have cleared tags, - // but masked or trashed entities *still* have tags in the db fixme so what? + // but masked or trashed entities *still* have tags in the db todo so what? entity.ResetDirtyProperties(); @@ -842,7 +837,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } // reading repository purely for looking up by GUID - // fixme - ugly and to fix we need to decouple the IRepositoryQueryable -> IRepository -> IReadRepository which should all be separate things! + // todo - ugly and to fix we need to decouple the IRepositoryQueryable -> IRepository -> IReadRepository which should all be separate things! private class ContentByGuidReadRepository : NPocoRepositoryBase { private readonly DocumentRepository _outerRepo; @@ -1129,7 +1124,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // get properties - indexed by version id var versionId = dto.DocumentVersionDto.Id; - // fixme - shall we get published properties or not? + // todo - shall we get published properties or not? //var publishedVersionId = dto.Published ? dto.PublishedVersionDto.Id : 0; var publishedVersionId = dto.PublishedVersionDto != null ? dto.PublishedVersionDto.Id : 0; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs index 2be27deb0a..c531b991a9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs @@ -14,8 +14,6 @@ using Umbraco.Core.Services; namespace Umbraco.Core.Persistence.Repositories.Implement { - // fixme - use sql templates everywhere! - /// /// Represents the EntityRepository used to query entity objects. /// @@ -64,7 +62,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement ApplyOrdering(ref sql, ordering); } - //fixme - we should be able to do sql = sql.OrderBy(x => Alias(x.NodeId, "NodeId")); but we can't because the OrderBy extension don't support Alias currently + //todo - we should be able to do sql = sql.OrderBy(x => Alias(x.NodeId, "NodeId")); but we can't because the OrderBy extension don't support Alias currently //no matter what we always must have node id ordered at the end sql = ordering.Direction == Direction.Ascending ? sql.OrderBy("NodeId") : sql.OrderByDescending("NodeId"); @@ -75,7 +73,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (isContent) BuildVariants(entities.Cast()); - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media if (isMedia) BuildProperties(entities, dtos); @@ -168,7 +166,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var entities = dtos.Select(x => BuildEntity(false, isMedia, x)).ToArray(); - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo- see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media if (isMedia && loadMediaProperties) BuildProperties(entities, dtos); @@ -229,7 +227,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return GetEntities(sql, isContent, isMedia, true); } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo- see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media internal IEnumerable GetMediaByQueryWithoutPropertyData(IQuery query) { var isContent = false; @@ -268,7 +266,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return Database.ExecuteScalar(sql) > 0; } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperties(EntitySlim entity, BaseDto dto) { var pdtos = Database.Fetch(GetPropertyData(dto.VersionId)); @@ -276,7 +274,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement BuildProperty(entity, pdto); } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperties(EntitySlim[] entities, List dtos) { var versionIds = dtos.Select(x => x.VersionId).Distinct().ToList(); @@ -292,7 +290,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media private void BuildProperty(EntitySlim entity, PropertyDataDto pdto) { // explain ?! @@ -541,7 +539,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (sql == null) throw new ArgumentNullException(nameof(sql)); if (ordering == null) throw new ArgumentNullException(nameof(ordering)); - //fixme - although this works for name, it probably doesn't work for others without an alias of some sort + //todo - although this works for name, it probably doesn't work for others without an alias of some sort var orderBy = ordering.OrderBy; if (ordering.Direction == Direction.Ascending) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs index f2c7e35395..94714d6ded 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs @@ -72,7 +72,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var translator = new SqlTranslator(sqlClause, query); var sql = translator.Translate(); - sql // fixme why? + sql .OrderBy(x => x.Level) .OrderBy(x => x.SortOrder); @@ -104,7 +104,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // ContentRepositoryBase expects a variantName field to order by name // for now, just return the plain invariant node name - // fixme media should support variants !! .AndSelect(x => Alias(x.Text, "variantName")); break; } @@ -125,13 +124,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return sql; } - // fixme - kill, eventually protected override Sql GetBaseQuery(bool isCount) { return GetBaseQuery(isCount ? QueryType.Count : QueryType.Single); } - // fixme - kill, eventually // ah maybe not, that what's used for eg Exists in base repo protected override string GetBaseWhereClause() { @@ -228,7 +225,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -307,7 +304,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name, entity.Id); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order @@ -496,7 +493,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var cached = IsolatedCache.GetCacheItem(RepositoryCacheKeys.GetKey(dto.NodeId)); if (cached != null && cached.VersionId == dto.ContentVersionDto.Id) { - content[i] = (Models.Media) cached; // fixme should we just cache Media not IMedia? + content[i] = (Models.Media) cached; continue; } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs index 2daa4abeca..3106a5f16e 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs @@ -66,7 +66,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { var baseQuery = GetBaseQuery(false); - // fixme why is this different from content/media?! + // todo why is this different from content/media?! // check if the query is based on properties or not var wheres = query.GetWhereClauses(); @@ -103,7 +103,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { var sql = SqlContext.Sql(); - switch (queryType) // FIXME pretend we still need these queries for now + switch (queryType) // todo pretend we still need these queries for now { case QueryType.Count: sql = sql.SelectCount(); @@ -143,18 +143,18 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return sql; } - // fixme - move that one up to Versionable! or better: kill it! + // todo - move that one up to Versionable! or better: kill it! protected override Sql GetBaseQuery(bool isCount) { return GetBaseQuery(isCount ? QueryType.Count : QueryType.Single); } - protected override string GetBaseWhereClause() // fixme - can we kill / refactor this? + protected override string GetBaseWhereClause() // todo - can we kill / refactor this? { return "umbracoNode.id = @id"; } - // fixme wtf? + // todo document/understand that one protected Sql GetNodeIdQueryWithPropertyData() { return Sql() @@ -237,7 +237,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement member.AddingEntity(); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // create the dto @@ -329,7 +329,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement member.UpdatingEntity(); // ensure that strings don't contain characters that are invalid in xml - // fixme - do we really want to keep doing this here? + // todo - do we really want to keep doing this here? entity.SanitizeEntityPropertiesForXmlStorage(); // if parent has changed, get path, level and sort order @@ -560,7 +560,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var cached = IsolatedCache.GetCacheItem(RepositoryCacheKeys.GetKey(dto.NodeId)); if (cached != null && cached.VersionId == dto.ContentVersionDto.Id) { - content[i] = (Member) cached; // fixme should we just cache Content not IContent? + content[i] = (Member) cached; continue; } } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs index 234693602f..a0ba2d5aa3 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs @@ -42,7 +42,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Abstract Methods - protected abstract Sql GetBaseQuery(bool isCount); // fixme obsolete, use QueryType instead everywhere + protected abstract Sql GetBaseQuery(bool isCount); // todo obsolete, use QueryType instead everywhere protected abstract string GetBaseWhereClause(); protected abstract IEnumerable GetDeleteClauses(); protected abstract Guid NodeObjectTypeId { get; } diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs index c8329d1f32..84e8ffc172 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs @@ -78,7 +78,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } } - // fixme - but now that we have 1 unique repository? + // todo - but now that we have 1 unique repository? // this is a *bad* idea because PerformCount captures the current repository and its UOW // //private static RepositoryCachePolicyOptions _defaultOptions; diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs index 298e503736..b4aa9c27f9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs @@ -20,7 +20,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override IRepositoryCachePolicy CreateCachePolicy() { - // fixme - wtf are we doing with cache here? + // todo - wtf are we doing with cache here? // why are we using disabled cache helper up there? // // 7.6 says: diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs index 918cc66cb0..52846f9486 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs @@ -65,7 +65,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (_passwordConfigInitialized) return _passwordConfigJson; - // fixme - this is bad + // todo - this is bad // because the membership provider we're trying to get has a dependency on the user service // and we should not depend on services in repositories - need a way better way to do this @@ -238,7 +238,7 @@ ORDER BY colName"; public void ClearLoginSession(Guid sessionId) { - // fixme why is that one updating and not deleting? + // todo why is that one updating and not deleting? Database.Execute(Sql() .Update(u => u.Set(x => x.LoggedOutUtc, DateTime.UtcNow)) .Where(x => x.SessionId == sessionId)); @@ -313,7 +313,7 @@ ORDER BY colName"; var sql = SqlContext.Sql() .Select() .From() - .WhereIn(x => x.UserId, userIds); + .WhereIn(x => x.UserId, userIds); var users2groups = Database.Fetch(sql); var groupIds = users2groups.Select(x => x.UserGroupId).ToList(); diff --git a/src/Umbraco.Core/Persistence/SqlTemplate.cs b/src/Umbraco.Core/Persistence/SqlTemplate.cs index e81da20f41..6a7d1a8d6c 100644 --- a/src/Umbraco.Core/Persistence/SqlTemplate.cs +++ b/src/Umbraco.Core/Persistence/SqlTemplate.cs @@ -117,7 +117,6 @@ namespace Umbraco.Core.Persistence public static IEnumerable ArgIn(string name) { // don't return an empty enumerable, as it breaks NPoco - // fixme - should we cache these arrays? return new[] { default (T) }; } } diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs index fdf8061c8e..672e5ac2e2 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs @@ -159,7 +159,7 @@ namespace Umbraco.Core.Persistence #region OnSomething - // fixme.poco - has new interceptors to replace OnSomething? + // todo - has new interceptors to replace OnSomething? protected override DbConnection OnConnectionOpened(DbConnection connection) { @@ -226,7 +226,7 @@ namespace Umbraco.Core.Persistence cmd.CommandTimeout = cmd.Connection.ConnectionTimeout; if (EnableSqlTrace) - _logger.Debug("SQL Trace:\r\n{Sql}", CommandToString(cmd).Replace("{", "{{").Replace("}", "}}")); // fixme these escapes should be builtin + _logger.Debug("SQL Trace:\r\n{Sql}", CommandToString(cmd).Replace("{", "{{").Replace("}", "}}")); // todo these escapes should be builtin #if DEBUG_DATABASES // detects whether the command is already in use (eg still has an open reader...) diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs index 9ed52ca148..4a4ac04001 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs @@ -2,7 +2,6 @@ using System.Configuration; using System.Data.Common; using System.Threading; -using LightInject; using NPoco; using NPoco.FluentMappings; using Umbraco.Core.Exceptions; @@ -23,6 +22,8 @@ namespace Umbraco.Core.Persistence /// It wraps an NPoco UmbracoDatabaseFactory which is initializes with a proper IPocoDataFactory to ensure /// that NPoco's plumbing is cached appropriately for the whole application. /// + //todo these comments are not true anymore + //todo this class needs not be disposable! internal class UmbracoDatabaseFactory : DisposableObject, IUmbracoDatabaseFactory { private readonly Lazy _mappers; @@ -285,7 +286,7 @@ namespace Umbraco.Core.Persistence // thread, so we don't really know what we are disposing here... // besides, we don't really want to dispose the factory, which is a singleton... - // fixme - does not make any sense! + // todo - the class does not need be disposable //var db = _umbracoDatabaseAccessor.UmbracoDatabase; //_umbracoDatabaseAccessor.UmbracoDatabase = null; //db?.Dispose(); @@ -296,7 +297,7 @@ namespace Umbraco.Core.Persistence // this method provides a way to force-reset the variable internal void ResetForTests() { - // fixme - does not make any sense! + // todo remove all this eventually //var db = _umbracoDatabaseAccessor.UmbracoDatabase; //_umbracoDatabaseAccessor.UmbracoDatabase = null; //db?.Dispose(); diff --git a/src/Umbraco.Core/Properties/AssemblyInfo.cs b/src/Umbraco.Core/Properties/AssemblyInfo.cs index f2e8feaf29..9471285148 100644 --- a/src/Umbraco.Core/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Core/Properties/AssemblyInfo.cs @@ -18,8 +18,6 @@ using System.Runtime.InteropServices; [assembly: InternalsVisibleTo("Umbraco.Tests")] [assembly: InternalsVisibleTo("Umbraco.Tests.Benchmarks")] -[assembly: InternalsVisibleTo("Umbraco.Extensions")] // fixme - what is this? - // Allow this to be mocked in our unit tests [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] diff --git a/src/Umbraco.Core/PropertyEditors/DataEditor.cs b/src/Umbraco.Core/PropertyEditors/DataEditor.cs index f3fc4f669b..0db6dcb0dd 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditor.cs @@ -89,7 +89,7 @@ namespace Umbraco.Core.PropertyEditors /// Technically, it could be cached by datatype but let's keep things /// simple enough for now. /// - // fixme point of that one? shouldn't we always configure? + // todo point of that one? shouldn't we always configure? public IDataValueEditor GetValueEditor() => ExplicitValueEditor ?? CreateValueEditor(); /// @@ -113,7 +113,7 @@ namespace Umbraco.Core.PropertyEditors return ExplicitValueEditor; var editor = CreateValueEditor(); - ((DataValueEditor) editor).Configuration = configuration; // fixme casting is bad + ((DataValueEditor) editor).Configuration = configuration; // todo casting is bad return editor; } diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs index 912bf1c367..154fbfae98 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs @@ -59,46 +59,11 @@ namespace Umbraco.Core.PropertyEditors HideLabel = attribute.HideLabel; } - // fixme kabam! - // I don't understand the remarks in the code commented out below - // and then, - // IPropertyEditor come from a PropertyEditorCollection so they are singletons - // IValueEditor is the actual value editor used for editing the value, - // and it has its own configuration, depending on the datatype, so it - // should NOT be a singleton => do NOT cache it in PropertyEditor! - /// /// Gets or sets the value editor configuration. /// public virtual object Configuration { get; set; } - //private PreValueCollection _preVals; - //protected PreValueCollection PreValues - //{ - // get - // { - // if (_preVals == null) - // { - // throw new InvalidOperationException("Pre values cannot be accessed until the Configure method has been called"); - // } - // return _preVals; - // } - //} - - ///// - ///// This is called to configure the editor for display with it's prevalues, useful when properties need to change dynamically - ///// depending on what is in the pre-values. - ///// - ///// - ///// - ///// This cannot be used to change the value being sent to the editor, ConfigureEditor will be called *after* ConvertDbToEditor, pre-values - ///// should not be used to modify values. - ///// - //public virtual void ConfigureForDisplay(PreValueCollection preValues) - //{ - // _preVals = preValues ?? throw new ArgumentNullException(nameof(preValues)); - //} - /// /// Gets or sets the editor view. /// @@ -225,13 +190,6 @@ namespace Umbraco.Core.PropertyEditors return value.TryConvertTo(valueType); } - // fixme - not dealing with variants here! - // - // editors should declare whether they support variants, and then we should have a common - // way of dealing with it, ie of sending and receiving values, etc. - // eg - // [ { "value": "hello" }, { "lang": "fr-fr", "value": "bonjour" } ] - /// /// A method to deserialize the string value that has been saved in the content editor /// to an object to be stored in the database. @@ -325,7 +283,7 @@ namespace Umbraco.Core.PropertyEditors } } - // fixme - the methods below should be replaced by proper property value convert ToXPath usage! + // todo - the methods below should be replaced by proper property value convert ToXPath usage! /// /// Converts a property to Xml fragments. diff --git a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs index f109620ad9..16aa4d6d5c 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs @@ -46,7 +46,7 @@ namespace Umbraco.Core.PropertyEditors /// /// Gets a value editor. /// - IDataValueEditor GetValueEditor(); // fixme - should be configured?! + IDataValueEditor GetValueEditor(); // todo - should be configured?! /// /// Gets a configured value editor. diff --git a/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs index b5ed7c5917..c92b6fa0d3 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataValueEditor.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.PropertyEditors /// /// /// Use this property to add validators, not to validate. Use instead. - /// fixme replace with AddValidator? WithValidator? + /// todo replace with AddValidator? WithValidator? /// List Validators { get; } @@ -56,14 +56,12 @@ namespace Umbraco.Core.PropertyEditors /// object FromEditor(ContentPropertyData editorValue, object currentValue); - // fixme - editing - services should be injected - /// /// Converts a property value to a value for the editor. /// object ToEditor(Property property, IDataTypeService dataTypeService, string culture = null, string segment = null); - // fixme - editing - document or remove these + // todo / deal with this when unplugging the xml cache // why property vs propertyType? services should be injected! etc... IEnumerable ConvertDbToXml(Property property, IDataTypeService dataTypeService, ILocalizationService localizationService, bool published); XNode ConvertDbToXml(PropertyType propertyType, object value, IDataTypeService dataTypeService); diff --git a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs index d16ed4bd62..204dff6f19 100644 --- a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs @@ -17,7 +17,7 @@ namespace Umbraco.Core.PropertyEditors if (v == null) throw new InvalidOperationException($"Could not find a validator named \"{name}\"."); - // FIXME + // todo - what is this exactly? // we cannot return this instance, need to clone it? return (IManifestValueValidator) Activator.CreateInstance(v.GetType()); // ouch } diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs index 4c20016318..48bfc49ed9 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs @@ -26,7 +26,6 @@ namespace Umbraco.Core.PropertyEditors { // the default implementation uses the old magic null & string comparisons, // other implementations may be more clever, and/or test the final converted object values - // fixme - cannot access the intermediate value here? var value = property.GetSourceValue(culture, segment); return value != null && (!(value is string) || string.IsNullOrWhiteSpace((string) value) == false); } diff --git a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs index b3456dde84..e1f99083e8 100644 --- a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs @@ -43,7 +43,7 @@ namespace Umbraco.Core.PropertyEditors /// /// Gets or sets a value indicating whether to replace the tags entirely. /// - /// fixme usage? + // todo: what's the usage? public bool ReplaceTags { get; set; } /// diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs index a6ec9af01d..b211272b51 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs @@ -9,7 +9,7 @@ using System.Web; using Newtonsoft.Json; using Umbraco.Core.Serialization; -namespace Umbraco.Core.PropertyEditors.ValueConverters // fixme MOVE TO MODELS OR SOMETHING +namespace Umbraco.Core.PropertyEditors.ValueConverters { /// /// Represents a value of the image cropper value editor. @@ -59,7 +59,6 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters // fixme MOVE TO MODELS O : Crops.FirstOrDefault(x => x.Alias.InvariantEquals(alias)); } - // fixme was defined in web project, extension methods? why internal? internal void AppendCropBaseUrl(StringBuilder url, ImageCropperCrop crop, bool defaultCrop, bool preferFocalPoint) { if (preferFocalPoint && HasFocalPoint() diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs index a43d391dbe..12594eb842 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs @@ -67,7 +67,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters // GetPreValuesCollectionByDataTypeId is cached at repository level; // still, the collection is deep-cloned so this is kinda expensive, // better to cache here + trigger refresh in DataTypeCacheRefresher - // fixme wtf this should NOT be expensive! + // todo: this is cheap now, remove the caching return Storages.GetOrAdd(dataTypeId, id => { diff --git a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs index 3d959f5263..5535d5c67b 100644 --- a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs +++ b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs @@ -82,7 +82,7 @@ namespace Umbraco.Core.Runtime // by default we'll use the database server messenger with default options (no callbacks), // this will be overridden by either the legacy thing or the db thing in the corresponding - // components in the web project - fixme - should obsolete the legacy thing + // components in the web project - todo - should obsolete the legacy thing composition.RegisterUnique(factory => new DatabaseServerMessenger( factory.GetInstance(), diff --git a/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs b/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs index 8b8fc0cf35..aa4329773a 100644 --- a/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs +++ b/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs @@ -30,7 +30,6 @@ /// /// Bypasses caches entirely. /// Upon scope completion, clears the global L2 cache. - /// fixme - what about a L1 cache? /// None = 3 } diff --git a/src/Umbraco.Core/Scoping/Scope.cs b/src/Umbraco.Core/Scoping/Scope.cs index aa08016d3c..6aeee33c41 100644 --- a/src/Umbraco.Core/Scoping/Scope.cs +++ b/src/Umbraco.Core/Scoping/Scope.cs @@ -2,7 +2,6 @@ using System.Data; using Umbraco.Core.Cache; using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; using Umbraco.Core.Events; using Umbraco.Core.IO; using Umbraco.Core.Logging; @@ -16,18 +15,12 @@ namespace Umbraco.Core.Scoping /// Not thread-safe obviously. internal class Scope : IScope { - // fixme - // considering that a great amount of things here are only useful for the top-level - // scope would it make sense to have a ChildScope class that would have a smaller - // memory footprint? - private readonly ScopeProvider _scopeProvider; private readonly ILogger _logger; private readonly IsolationLevel _isolationLevel; private readonly RepositoryCacheMode _repositoryCacheMode; private readonly bool? _scopeFileSystem; - private readonly ScopeContext _scopeContext; private readonly bool _autoComplete; private bool _callContext; @@ -55,7 +48,7 @@ namespace Umbraco.Core.Scoping _scopeProvider = scopeProvider; _logger = logger; - _scopeContext = scopeContext; + Context = scopeContext; _isolationLevel = isolationLevel; _repositoryCacheMode = repositoryCacheMode; @@ -78,7 +71,7 @@ namespace Umbraco.Core.Scoping if (autoComplete) throw new ArgumentException("Cannot auto-complete a detachable scope.", nameof(autoComplete)); // detachable creates its own scope context - _scopeContext = new ScopeContext(); + Context = new ScopeContext(); // see note below if (scopeFileSystems == true) @@ -92,7 +85,7 @@ namespace Umbraco.Core.Scoping ParentScope = parent; // cannot specify a different mode! - // fixme - means that it's OK to go from L2 to None for reading purposes, but writing would be BAD! + // todo - means that it's OK to go from L2 to None for reading purposes, but writing would be BAD! // this is for XmlStore that wants to bypass caches when rebuilding XML (same for NuCache) if (repositoryCacheMode != RepositoryCacheMode.Unspecified && parent.RepositoryCacheMode > repositoryCacheMode) throw new ArgumentException($"Value '{repositoryCacheMode}' cannot be lower than parent value '{parent.RepositoryCacheMode}'.", nameof(repositoryCacheMode)); @@ -204,7 +197,7 @@ namespace Umbraco.Core.Scoping public ScopeContext OrigContext { get; set; } // the context (for attaching & detaching only) - public ScopeContext Context => _scopeContext; + public ScopeContext Context { get; } public IsolationLevel IsolationLevel { @@ -271,7 +264,7 @@ namespace Umbraco.Core.Scoping if (ParentScope != null) return ParentScope.Messages; return _messages ?? (_messages = new EventMessages()); - // fixme - event messages? + // todo - event messages? // this may be a problem: the messages collection will be cleared at the end of the scope // how shall we process it in controllers etc? if we don't want the global factory from v7? // it'd need to be captured by the controller @@ -330,7 +323,7 @@ namespace Umbraco.Core.Scoping if (_disposed) throw new ObjectDisposedException(GetType().FullName); - // fixme - safer? + // todo - safer? //if (Interlocked.CompareExchange(ref _disposed, 1, 0) != 0) // throw new ObjectDisposedException(GetType().FullName); } @@ -443,7 +436,7 @@ namespace Umbraco.Core.Scoping }, () => { // if *we* created it, then get rid of it - if (_scopeProvider.AmbientContext == _scopeContext) + if (_scopeProvider.AmbientContext == Context) { try { diff --git a/src/Umbraco.Core/Scoping/ScopeContext.cs b/src/Umbraco.Core/Scoping/ScopeContext.cs index 4ba1999474..3f70f1791e 100644 --- a/src/Umbraco.Core/Scoping/ScopeContext.cs +++ b/src/Umbraco.Core/Scoping/ScopeContext.cs @@ -13,8 +13,9 @@ namespace Umbraco.Core.Scoping if (_enlisted == null) return; - // fixme - can we create infinite loops? - // fixme - what about nested events? will they just be plainly ignored = really bad? + // todo + // - can we create infinite loops? + // - what about nested events? will they just be plainly ignored = really bad? List exceptions = null; List orderedEnlisted; diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs index 7915bbe24b..d9a8191441 100644 --- a/src/Umbraco.Core/Services/IContentService.cs +++ b/src/Umbraco.Core/Services/IContentService.cs @@ -242,7 +242,7 @@ namespace Umbraco.Core.Services /// /// Saves documents. /// - // fixme why only 1 result not 1 per content?! + // todo why only 1 result not 1 per content?! OperationResult Save(IEnumerable contents, int userId = 0, bool raiseEvents = true); /// diff --git a/src/Umbraco.Core/Services/IEntityService.cs b/src/Umbraco.Core/Services/IEntityService.cs index 3937d5bf40..a9a3c0c59b 100644 --- a/src/Umbraco.Core/Services/IEntityService.cs +++ b/src/Umbraco.Core/Services/IEntityService.cs @@ -243,7 +243,7 @@ namespace Umbraco.Core.Services IQuery filter = null, Ordering ordering = null); /// - /// Gets descendants of root. fixme: Do we really need this? why not just pass in -1 + /// Gets descendants of root. todo: Do we really need this? why not just pass in -1 /// IEnumerable GetPagedDescendants(UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery filter = null, Ordering ordering = null, bool includeTrashed = true); diff --git a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs index 405fc47c3a..1c58fc56b8 100644 --- a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs @@ -14,7 +14,7 @@ namespace Umbraco.Core.Services /// XElement Serialize(IContent content, bool published, - bool withDescendants = false) //fixme take care of usage! only used for the packager + bool withDescendants = false) //todo take care of usage! only used for the packager ; /// diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index 9943893473..9223793269 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -164,7 +164,7 @@ namespace Umbraco.Core.Services.Implement /// public IContent Create(string name, Guid parentId, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? var parent = GetById(parentId); return Create(name, parent, contentTypeAlias, userId); @@ -184,7 +184,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent Create(string name, int parentId, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? var contentType = GetContentType(contentTypeAlias); if (contentType == null) @@ -217,7 +217,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent Create(string name, IContent parent, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); @@ -248,7 +248,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent CreateAndSave(string name, int parentId, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? using (var scope = ScopeProvider.CreateScope()) { @@ -282,7 +282,7 @@ namespace Umbraco.Core.Services.Implement /// The content object. public IContent CreateAndSave(string name, IContent parent, string contentTypeAlias, int userId = 0) { - //fixme - what about culture? + // todo - what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); @@ -750,8 +750,6 @@ namespace Umbraco.Core.Services.Implement #region Save, Publish, Unpublish - // fixme - kill all those raiseEvents - /// public OperationResult Save(IContent content, int userId = 0, bool raiseEvents = true) { @@ -1018,7 +1016,6 @@ namespace Umbraco.Core.Services.Implement // keep going, though, as we want to save anyways } - //fixme - casting // reset published state from temp values (publishing, unpublishing) to original value // (published, unpublished) in order to save the document, unchanged ((Content)content).Published = content.Published; @@ -1042,7 +1039,6 @@ namespace Umbraco.Core.Services.Implement unpublishResult = StrategyUnpublish(scope, content, userId, evtMsgs); else { - //fixme - casting // reset published state from temp values (publishing, unpublishing) to original value // (published, unpublished) in order to save the document, unchanged ((Content)content).Published = content.Published; @@ -1414,8 +1410,6 @@ namespace Umbraco.Core.Services.Implement { scope.WriteLock(Constants.Locks.ContentTree); - // fixme events?! - if (!document.HasIdentity) throw new InvalidOperationException("Cannot not branch-publish a new document."); @@ -1624,7 +1618,6 @@ namespace Umbraco.Core.Services.Implement if (deletePriorVersions) { var content = GetVersion(versionId); - // fixme nesting uow? DeleteVersions(id, content.UpdateDate, userId); } @@ -1810,7 +1803,6 @@ namespace Umbraco.Core.Services.Implement private void PerformMoveContentLocked(IContent content, int userId, bool? trash) { - //fixme no casting if (trash.HasValue) ((ContentBase)content).Trashed = trash.Value; content.WriterId = userId; _documentRepository.Save(content); @@ -2391,7 +2383,6 @@ namespace Umbraco.Core.Services.Implement // ensure that the document has published values // either because it is 'publishing' or because it already has a published version - //fixme - casting if (((Content)content).PublishedState != PublishedState.Publishing && content.PublishedVersionId == 0) { Logger.Info("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "document does not have published values"); @@ -2461,7 +2452,6 @@ namespace Umbraco.Core.Services.Implement EventMessages evtMsgs) { // change state to publishing - // fixme - casting ((Content)content).PublishedState = PublishedState.Publishing; //if this is a variant then we need to log which cultures have been published/unpublished and return an appropriate result @@ -2541,7 +2531,6 @@ namespace Umbraco.Core.Services.Implement Logger.Info("Document {ContentName} (id={ContentId}) had its release date removed, because it was unpublished.", content.Name, content.Id); // change state to unpublishing - // fixme - casting ((Content)content).PublishedState = PublishedState.Unpublishing; Logger.Info("Document {ContentName} (id={ContentId}) has been unpublished.", content.Name, content.Id); diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs index 8189c6524e..234fa0b1e0 100644 --- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs @@ -353,7 +353,7 @@ namespace Umbraco.Core.Services.Implement public IEnumerable GetComposedOf(int id) { // GetAll is cheap, repository has a full dataset cache policy - // fixme - still, because it uses the cache, race conditions! + // todo - still, because it uses the cache, race conditions! var allContentTypes = GetAll(Array.Empty()); return GetComposedOf(id, allContentTypes); } diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Core/Services/Implement/DataTypeService.cs index 84d44649da..16b0dfd953 100644 --- a/src/Umbraco.Core/Services/Implement/DataTypeService.cs +++ b/src/Umbraco.Core/Services/Implement/DataTypeService.cs @@ -204,7 +204,7 @@ namespace Umbraco.Core.Services.Implement _dataTypeContainerRepository.Save(container); scope.Complete(); - // fixme - triggering SavedContainer with a different name?! + // todo - triggering SavedContainer with a different name?! scope.Events.Dispatch(SavedContainer, this, new SaveEventArgs(container, evtMsgs), "RenamedContainer"); return OperationResult.Attempt.Succeed(OperationResultType.Success, evtMsgs, container); @@ -318,7 +318,7 @@ namespace Umbraco.Core.Services.Implement } catch (DataOperationException ex) { - scope.Complete(); // fixme what are we doing here exactly? + scope.Complete(); // todo what are we doing here exactly? return OperationResult.Attempt.Fail(ex.Operation, evtMsgs); } } @@ -426,8 +426,8 @@ namespace Umbraco.Core.Services.Implement // find ContentTypes using this IDataTypeDefinition on a PropertyType, and delete - // fixme - media and members?! - // fixme - non-group properties?! + // todo - media and members?! + // todo - non-group properties?! var query = Query().Where(x => x.DataTypeId == dataType.Id); var contentTypes = _contentTypeRepository.GetByQuery(query); foreach (var contentType in contentTypes) diff --git a/src/Umbraco.Core/Services/Implement/EntityService.cs b/src/Umbraco.Core/Services/Implement/EntityService.cs index 37b569b814..ee6bdeb46d 100644 --- a/src/Umbraco.Core/Services/Implement/EntityService.cs +++ b/src/Umbraco.Core/Services/Implement/EntityService.cs @@ -388,7 +388,7 @@ namespace Umbraco.Core.Services.Implement { var query = Query().Where(x => x.ParentId == parentId); - //fixme - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media + //todo - see https://github.com/umbraco/Umbraco-CMS/pull/3460#issuecomment-434903930 we need to not load any property data at all for media return ((EntityRepository)_entityRepository).GetMediaByQueryWithoutPropertyData(query); } } diff --git a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs index fd1067b3e5..6b52dd4ac1 100644 --- a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs @@ -47,7 +47,7 @@ namespace Umbraco.Core.Services.Implement /// public XElement Serialize(IContent content, bool published, - bool withDescendants = false) //fixme take care of usage! only used for the packager + bool withDescendants = false) //todo take care of usage! only used for the packager { if (content == null) throw new ArgumentNullException(nameof(content)); diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Core/Services/Implement/FileService.cs index 0c08404ab3..bbf5a687a8 100644 --- a/src/Umbraco.Core/Services/Implement/FileService.cs +++ b/src/Umbraco.Core/Services/Implement/FileService.cs @@ -331,7 +331,7 @@ namespace Umbraco.Core.Services.Implement var evtMsgs = EventMessagesFactory.Get(); - //fixme: This isn't pretty because we we're required to maintain backwards compatibility so we could not change + //todo: This isn't pretty because we we're required to maintain backwards compatibility so we could not change // the event args here. The other option is to create a different event with different event // args specifically for this method... which also isn't pretty. So fix this in v8! var additionalData = new Dictionary diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs index f8c6badb37..4c5fea0baa 100644 --- a/src/Umbraco.Core/Services/Implement/MediaService.cs +++ b/src/Umbraco.Core/Services/Implement/MediaService.cs @@ -882,7 +882,7 @@ namespace Umbraco.Core.Services.Implement { scope.WriteLock(Constants.Locks.MediaTree); - // fixme - missing 7.6 "ensure valid path" thing here? + // todo - missing 7.6 "ensure valid path" thing here? // but then should be in PerformMoveLocked on every moved item? var originalPath = media.Path; diff --git a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs index 15b3101744..d9ae7e4261 100644 --- a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs +++ b/src/Umbraco.Core/Services/Implement/MemberGroupService.cs @@ -27,19 +27,6 @@ namespace Umbraco.Core.Services.Implement void MemberGroupRepository_SavingMemberGroup(IMemberGroupRepository sender, SaveEventArgs e) { - // fixme - wtf? - // why is the repository triggering these events? - // and, the events are *dispatched* by the repository so it makes no sense dispatching them again! - - // v7.6 - //using (var scope = UowProvider.ScopeProvider.CreateScope()) - //{ - // scope.Complete(); // always - // if (scope.Events.DispatchCancelable(Saving, this, new SaveEventArgs(e.SavedEntities))) - // e.Cancel = true; - //} - - // v8 if (Saving.IsRaisedEventCancelled(new SaveEventArgs(e.SavedEntities), this)) e.Cancel = true; } diff --git a/src/Umbraco.Core/Services/Implement/MemberService.cs b/src/Umbraco.Core/Services/Implement/MemberService.cs index 2f8c2f9a79..5726c43fc7 100644 --- a/src/Umbraco.Core/Services/Implement/MemberService.cs +++ b/src/Umbraco.Core/Services/Implement/MemberService.cs @@ -391,8 +391,6 @@ namespace Umbraco.Core.Services.Implement } } - // fixme get rid of string filter? - public IEnumerable GetAll(long pageIndex, int pageSize, out long totalRecords, string orderBy, Direction orderDirection, string memberTypeAlias = null, string filter = "") { @@ -1306,7 +1304,7 @@ namespace Umbraco.Core.Services.Implement Id = property.Id, Alias = property.Alias, Name = property.PropertyType.Name, - Value = property.GetValue(), // fixme ignoring variants + Value = property.GetValue(), // todo ignoring variants CreateDate = property.CreateDate, UpdateDate = property.UpdateDate }; @@ -1379,7 +1377,6 @@ namespace Umbraco.Core.Services.Implement } } - // fixme - this should not be here, or??? public string GetDefaultMemberType() { return Current.Services.MemberTypeService.GetDefault(); diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs index ef2bfafcf6..214882a8f2 100644 --- a/src/Umbraco.Core/Services/Implement/NotificationService.cs +++ b/src/Umbraco.Core/Services/Implement/NotificationService.cs @@ -307,7 +307,7 @@ namespace Umbraco.Core.Services.Implement summary.Append(""); foreach (var p in content.Properties) { - //fixme doesn't take into account variants + //todo doesn't take into account variants var newText = p.GetValue() != null ? p.GetValue().ToString() : ""; var oldText = newText; diff --git a/src/Umbraco.Core/Services/Implement/RelationService.cs b/src/Umbraco.Core/Services/Implement/RelationService.cs index a4c1b977a0..4d610da4f9 100644 --- a/src/Umbraco.Core/Services/Implement/RelationService.cs +++ b/src/Umbraco.Core/Services/Implement/RelationService.cs @@ -393,7 +393,7 @@ namespace Umbraco.Core.Services.Implement if (scope.Events.DispatchCancelable(SavingRelation, this, saveEventArgs)) { scope.Complete(); - return relation; // fixme - returning sth that does not exist here?! // fixme - returning sth that does not exist here?! + return relation; // todo - returning sth that does not exist here?! } _relationRepository.Save(relation); diff --git a/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs b/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs index 4905f8b32d..784d18da4e 100644 --- a/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs +++ b/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs @@ -4,7 +4,7 @@ using Umbraco.Core.Scoping; namespace Umbraco.Core.Services.Implement { - // fixme that one does not add anything = kill + // todo that one does not add anything = kill public abstract class ScopeRepositoryService : RepositoryService { protected ScopeRepositoryService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory) diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Core/Services/Implement/UserService.cs index 188c6feb04..4d01b97ad8 100644 --- a/src/Umbraco.Core/Services/Implement/UserService.cs +++ b/src/Umbraco.Core/Services/Implement/UserService.cs @@ -200,7 +200,7 @@ namespace Umbraco.Core.Services.Implement } catch (DbException) { - // fixme - refactor users/upgrade + // todo - refactor users/upgrade // currently kinda accepting anything on upgrade, but that won't deal with all cases // so we need to do it differently, see the custom UmbracoPocoDataBuilder which should // be better BUT requires that the app restarts after the upgrade! @@ -705,7 +705,7 @@ namespace Umbraco.Core.Services.Implement } catch (DbException) { - // fixme - refactor users/upgrade + // todo - refactor users/upgrade // currently kinda accepting anything on upgrade, but that won't deal with all cases // so we need to do it differently, see the custom UmbracoPocoDataBuilder which should // be better BUT requires that the app restarts after the upgrade! diff --git a/src/Umbraco.Core/Services/OperationResult.cs b/src/Umbraco.Core/Services/OperationResult.cs index e901b58119..f6349a985d 100644 --- a/src/Umbraco.Core/Services/OperationResult.cs +++ b/src/Umbraco.Core/Services/OperationResult.cs @@ -3,7 +3,7 @@ using Umbraco.Core.Events; namespace Umbraco.Core.Services { - // FIXME + // todo // no need for Attempt - the operation result SHOULD KNOW if it's a success or a failure! // but then each WhateverResultType must @@ -119,7 +119,7 @@ namespace Umbraco.Core.Services return new OperationResult(OperationResultType.FailedCancelledByEvent, eventMessages); } - // fixme - this exists to support services that still return Attempt + // todo - this exists to support services that still return Attempt // these services should directly return an OperationResult, and then this static class should be deleted internal static class Attempt { diff --git a/src/Umbraco.Core/Services/OperationResultType.cs b/src/Umbraco.Core/Services/OperationResultType.cs index 9310741ca5..01d0434b87 100644 --- a/src/Umbraco.Core/Services/OperationResultType.cs +++ b/src/Umbraco.Core/Services/OperationResultType.cs @@ -38,7 +38,7 @@ /// /// No operation has been executed because it was not needed (eg deleting an item that doesn't exist). /// - NoOperation = Failed | 6, // fixme shouldn't it be a success? + NoOperation = Failed | 6, // todo shouldn't it be a success? //TODO: In the future, we might need to add more operations statuses, potentially like 'FailedByPermissions', etc... } diff --git a/src/Umbraco.Core/Services/PublishResultType.cs b/src/Umbraco.Core/Services/PublishResultType.cs index f79dab91d3..acf2b43951 100644 --- a/src/Umbraco.Core/Services/PublishResultType.cs +++ b/src/Umbraco.Core/Services/PublishResultType.cs @@ -115,7 +115,7 @@ /// /// The document could not be published because it has no publishing flags or values. /// - FailedPublishNothingToPublish = FailedPublish | 9, // in ContentService.StrategyCanPublish - fixme weird + FailedPublishNothingToPublish = FailedPublish | 9, // in ContentService.StrategyCanPublish - todo weird /// /// The document could not be published because some mandatory cultures are missing. diff --git a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs index b1c617e9a7..40c9b758d1 100644 --- a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs +++ b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs @@ -3337,7 +3337,7 @@ namespace Umbraco.Core.Strings // time for a T4 template? // also we should support extensibility so ppl can register more cases in external code - // fixme + // todo // transliterates Анастасия as Anastasiya, and not Anastasia // Ольга --> Ol'ga, Татьяна --> Tat'yana -- that's bad (?) // Note: should ä (german umlaut) become a or ae ? diff --git a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs index 0a8d60e209..d2b7903343 100644 --- a/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs +++ b/src/Umbraco.Core/Sync/ApplicationUrlHelper.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.Sync /// in config files but is determined programmatically. /// Must be assigned before resolution is frozen. /// - // FIXME need another way to do it, eg an interface, injected! + // todo need another way to do it, eg an interface, injected! public static Func ApplicationUrlProvider { get; set; } internal static string GetApplicationUrl(ILogger logger, IGlobalSettings globalSettings, IUmbracoSettingsSection settings, IServerRegistrar serverRegistrar, HttpRequestBase request = null) diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs index 6844e6e75c..fa59fe2e9c 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs @@ -302,7 +302,7 @@ namespace Umbraco.Core.Sync // (depending on what the cache refreshers are doing). I think it's best we do the one time check, process them and continue, if there are // pending requests after being processed, they'll just be processed on the next poll. // - // FIXME not true if we're running on a background thread, assuming we can? + // todo not true if we're running on a background thread, assuming we can? var sql = Sql().SelectAll() .From() diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index ec9b2d8eb0..f1a000f57c 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -598,7 +598,6 @@ - @@ -806,7 +805,6 @@ - @@ -1007,7 +1005,6 @@ - From 9522ee826f06752ae5f84b344a7fd07ac058635b Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 21 Jan 2019 15:57:48 +0100 Subject: [PATCH 8/8] Deal with fixme in Umbraco.Web --- .../Cache/ContentCacheRefresher.cs | 4 ++-- .../Cache/DataTypeCacheRefresher.cs | 2 +- .../Cache/DistributedCacheBinder.cs | 2 +- .../Cache/DistributedCacheBinder_Handlers.cs | 10 ++++---- .../Cache/LanguageCacheRefresher.cs | 2 +- src/Umbraco.Web/Composing/Current.cs | 2 +- .../Controllers/UmbLoginController.cs | 7 ++---- .../Controllers/UmbLoginStatusController.cs | 10 ++++---- .../Controllers/UmbProfileController.cs | 10 ++++---- .../Controllers/UmbRegisterController.cs | 10 ++++---- .../Editors/BackOfficeServerVariables.cs | 4 ++-- src/Umbraco.Web/Editors/ContentController.cs | 11 +++------ .../Editors/ContentControllerBase.cs | 2 +- .../Editors/DataTypeValidateAttribute.cs | 2 +- src/Umbraco.Web/Editors/EditorValidator.cs | 2 +- src/Umbraco.Web/Editors/EntityController.cs | 4 +--- .../Filters/UserGroupValidateAttribute.cs | 2 +- .../Editors/KeepAliveController.cs | 2 +- src/Umbraco.Web/Editors/MemberController.cs | 2 +- .../Editors/NuCacheStatusController.cs | 1 - src/Umbraco.Web/Editors/PreviewController.cs | 7 ------ .../Editors/TemplateQueryController.cs | 3 +-- src/Umbraco.Web/Editors/UsersController.cs | 2 +- .../HealthCheck/HealthCheckResults.cs | 2 +- .../Install/InstallStepCollection.cs | 2 +- .../InstallSteps/StarterKitCleanupStep.cs | 2 +- .../Install/InstallSteps/UpgradeStep.cs | 4 ++-- .../Install/Models/InstallPackageModel.cs | 2 +- src/Umbraco.Web/Logging/WebProfiler.cs | 2 +- .../Mapping/ContentItemDisplayNameResolver.cs | 23 ------------------- .../ContentPropertyDisplayConverter.cs | 2 +- .../Mapping/ContentTypeProfileExtensions.cs | 4 ++-- .../Models/Mapping/DatabaseTypeResolver.cs | 2 +- .../Models/Mapping/EntityMapperProfile.cs | 2 +- .../Models/Mapping/MacroMapperProfile.cs | 2 +- .../MemberTabsAndPropertiesResolver.cs | 2 +- .../PublishedValueFallback.cs | 2 +- .../Models/PublishedContentBase.cs | 8 +++---- src/Umbraco.Web/Models/PublishedProperty.cs | 2 +- src/Umbraco.Web/Mvc/RenderMvcController.cs | 1 - src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 2 +- src/Umbraco.Web/Mvc/SurfaceController.cs | 7 ++---- src/Umbraco.Web/Mvc/UmbracoController.cs | 8 ------- .../Mvc/UmbracoViewPageOfTModel.cs | 2 +- src/Umbraco.Web/Properties/AssemblyInfo.cs | 4 ---- .../PropertyEditors/GridConfiguration.cs | 4 ++-- .../ImageCropperPropertyEditor.cs | 2 +- .../ImageCropperPropertyValueEditor.cs | 2 +- .../PropertyEditors/ListViewConfiguration.cs | 6 ++--- .../MacroContainerPropertyEditor.cs | 2 +- .../MultipleTextStringConfigurationEditor.cs | 4 ++-- .../NestedContentPropertyEditor.cs | 2 -- .../PropertyEditors/RichTextConfiguration.cs | 2 +- .../PropertyEditors/TrueFalseConfiguration.cs | 2 +- .../PublishedCache/IPublishedCache.cs | 2 +- .../PublishedCache/NuCache/ContentCache.cs | 2 +- .../PublishedCache/NuCache/ContentNode.cs | 2 +- .../PublishedCache/NuCache/ContentStore.cs | 4 ++-- ....DictionaryOfCultureVariationSerializer.cs | 2 +- .../NuCache/DataSource/DatabaseDataSource.cs | 2 +- .../NuCache/DataSource/PropertyData.cs | 4 ++-- src/Umbraco.Web/Umbraco.Web.csproj | 1 - .../PackageActions/publishRootDocument.cs | 2 +- 63 files changed, 84 insertions(+), 153 deletions(-) delete mode 100644 src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs index 3f2ef1620c..a1942ed141 100644 --- a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs @@ -75,7 +75,7 @@ namespace Umbraco.Web.Cache if (assignedDomains.Count > 0) { - //fixme - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, + // todo - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, // and we cannot inject the CacheRefresherCollection since that would be a circular reference, so what is the best way to call directly in to the // DomainCacheRefresher? @@ -92,7 +92,7 @@ namespace Umbraco.Web.Cache // content and when the PublishedCachesService is notified of changes it does not see // the new content... - // fixme - what about this? + // todo - what about this? // should rename it, and then, this is only for Deploy, and then, ??? //if (Suspendable.PageCacheRefresher.CanUpdateDocumentCache) // ... diff --git a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs index f3d1337403..6916b40f2d 100644 --- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs @@ -56,7 +56,7 @@ namespace Umbraco.Web.Cache _idkMap.ClearCache(payload.Id); } - // fixme - not sure I like these? + // todo - not sure I like these? TagsValueConverter.ClearCaches(); SliderValueConverter.ClearCaches(); diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs index f7171a840a..ce8267dfc8 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs @@ -71,7 +71,7 @@ namespace Umbraco.Web.Cache var handler = FindHandler(e); if (handler == null) { - // fixme - should this be fatal (ie, an exception)? + // todo - should this be fatal (ie, an exception)? var name = e.Sender.GetType().Name + "_" + e.EventName; _logger.Warn("Dropping event {EventName} because no corresponding handler was found.", name); continue; diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs index 3a3eb1b8fb..f75d8ead87 100644 --- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs @@ -71,7 +71,6 @@ namespace Umbraco.Web.Cache () => DataTypeService.Saved -= DataTypeService_Saved); // bind to stylesheet events - // fixme why not in v8? Bind(() => FileService.SavedStylesheet += FileService_SavedStylesheet, () => FileService.SavedStylesheet -= FileService_SavedStylesheet); Bind(() => FileService.DeletedStylesheet += FileService_DeletedStylesheet, @@ -197,7 +196,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshContentCache(args.Changes.ToArray()); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void ContentService_Deleted(IContentService sender, DeleteEventArgs e) { } private void ContentService_Moved(IContentService sender, MoveEventArgs e) { } private void ContentService_Trashed(IContentService sender, MoveEventArgs e) { } @@ -308,7 +307,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshContentTypeCache(args.Changes.ToArray()); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void ContentTypeService_Saved(IContentTypeService sender, SaveEventArgs args) { } private void MediaTypeService_Saved(IMediaTypeService sender, SaveEventArgs args) { } private void MemberTypeService_Saved(IMemberTypeService sender, SaveEventArgs args) { } @@ -320,7 +319,6 @@ namespace Umbraco.Web.Cache #region UserService - // fixme STATIC?? private void UserService_UserGroupPermissionsAssigned(IUserService sender, SaveEventArgs e) { //TODO: Not sure if we need this yet depends if we start caching permissions @@ -381,7 +379,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshTemplateCache(entity.Id); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void FileService_DeletedStylesheet(IFileService sender, DeleteEventArgs e) { } private void FileService_SavedStylesheet(IFileService sender, SaveEventArgs e) { } @@ -410,7 +408,7 @@ namespace Umbraco.Web.Cache _distributedCache.RefreshMediaCache(args.Changes.ToArray()); } - // fixme our weird events handling wants this for now + // todo our weird events handling wants this for now private void MediaService_Saved(IMediaService sender, SaveEventArgs e) { } private void MediaService_Deleted(IMediaService sender, DeleteEventArgs e) { } private void MediaService_Moved(IMediaService sender, MoveEventArgs e) { } diff --git a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs index f5fe5075eb..c5dfcfd1e7 100644 --- a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs @@ -57,7 +57,7 @@ namespace Umbraco.Web.Cache if (assignedDomains.Count > 0) { - //fixme - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, + // todo - this is duplicating the logic in DomainCacheRefresher BUT we cannot inject that into this because it it not registered explicitly in the container, // and we cannot inject the CacheRefresherCollection since that would be a circular reference, so what is the best way to call directly in to the // DomainCacheRefresher? diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs index 28404148b8..bd0e3d02dc 100644 --- a/src/Umbraco.Web/Composing/Current.cs +++ b/src/Umbraco.Web/Composing/Current.cs @@ -63,7 +63,7 @@ namespace Umbraco.Web.Composing #region Temp & Special - // fixme - have to keep this until tests are refactored + // todo - have to keep this until tests are refactored // but then, it should all be managed properly in the container public static IUmbracoContextAccessor UmbracoContextAccessor { diff --git a/src/Umbraco.Web/Controllers/UmbLoginController.cs b/src/Umbraco.Web/Controllers/UmbLoginController.cs index 3b6389f25a..97444dbc6a 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginController.cs @@ -11,15 +11,12 @@ namespace Umbraco.Web.Controllers { public class UmbLoginController : SurfaceController { - // fixme - delete? public UmbLoginController() - { - } + { } public UmbLoginController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs index 02d567c2bb..fddefbe4a9 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs @@ -13,14 +13,12 @@ namespace Umbraco.Web.Controllers [MemberAuthorize] public class UmbLoginStatusController : SurfaceController { - // fixme - delete? public UmbLoginStatusController() - { - } + { } - public UmbLoginStatusController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + public UmbLoginStatusController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) + : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Controllers/UmbProfileController.cs b/src/Umbraco.Web/Controllers/UmbProfileController.cs index 6c639d4216..f22192a1cc 100644 --- a/src/Umbraco.Web/Controllers/UmbProfileController.cs +++ b/src/Umbraco.Web/Controllers/UmbProfileController.cs @@ -14,14 +14,12 @@ namespace Umbraco.Web.Controllers [MemberAuthorize] public class UmbProfileController : SurfaceController { - // fixme - delete? public UmbProfileController() - { - } + { } - public UmbProfileController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + public UmbProfileController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) + : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Controllers/UmbRegisterController.cs b/src/Umbraco.Web/Controllers/UmbRegisterController.cs index 8de92a8a71..66c8a8143c 100644 --- a/src/Umbraco.Web/Controllers/UmbRegisterController.cs +++ b/src/Umbraco.Web/Controllers/UmbRegisterController.cs @@ -13,14 +13,12 @@ namespace Umbraco.Web.Controllers { public class UmbRegisterController : SurfaceController { - // fixme - delete? public UmbRegisterController() - { - } + { } - public UmbRegisterController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + public UmbRegisterController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) + : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) + { } [HttpPost] [ValidateAntiForgeryToken] diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index e266ca01c3..40891efe9e 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -425,7 +425,7 @@ namespace Umbraco.Web.Editors /// it's resolving which is unecessary and annoying. /// private static readonly Lazy> TreeControllerTypes - = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // fixme inject + = new Lazy>(() => Current.TypeLoader.GetAttributedTreeControllers().ToArray()); // todo inject /// /// Returns the server variables regarding the application state @@ -438,7 +438,7 @@ namespace Umbraco.Web.Editors // add versions - see UmbracoVersion for details & differences // the complete application version (eg "8.1.2-alpha.25") - { "version", _runtimeState.SemanticVersion.ToSemanticString() }, // fixme that's UmbracoVersion.Version! + { "version", UmbracoVersion.SemanticVersion.ToSemanticString() }, // the assembly version (eg "8.0.0") { "assemblyVersion", UmbracoVersion.AssemblyVersion.ToString() } diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 3b361fcf1e..1e48f027d4 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -94,10 +94,8 @@ namespace Umbraco.Web.Editors [FilterAllowedOutgoingContent(typeof(IEnumerable))] public IEnumerable GetByIds([FromUri]int[] ids) { - //fixme what about cultures? - var foundContent = Services.ContentService.GetByIds(ids); - return foundContent.Select(x => MapToDisplay(x)); + return foundContent.Select(MapToDisplay); } /// @@ -248,7 +246,6 @@ namespace Umbraco.Web.Editors return display; } - //fixme what about cultures? public ContentItemDisplay GetBlueprintById(int id) { var foundContent = Services.ContentService.GetBlueprintById(id); @@ -274,7 +271,7 @@ namespace Umbraco.Web.Editors content.AllowedActions = new[] { "A" }; content.IsBlueprint = true; - //fixme - exclude the content apps here + //todo - exclude the content apps here //var excludeProps = new[] { "_umb_urls", "_umb_releasedate", "_umb_expiredate", "_umb_template" }; //var propsTab = content.Tabs.Last(); //propsTab.Properties = propsTab.Properties @@ -2021,7 +2018,7 @@ namespace Umbraco.Web.Editors case PublishResultType.FailedPublishMandatoryCultureMissing: display.AddWarningNotification( Services.TextService.Localize("publish"), - "publish/contentPublishedFailedByCulture"); // fixme properly localize, these keys are missing from lang files! + "publish/contentPublishedFailedByCulture"); break; default: throw new IndexOutOfRangeException($"PublishedResultType \"{status.Key}\" was not expected."); @@ -2080,8 +2077,6 @@ namespace Umbraco.Web.Editors var rollbackVersions = new List(); var writerIds = new HashSet(); - //Return a list of all versions of a specific content node - // fixme - cap at 50 versions for now? var versions = Services.ContentService.GetVersionsSlim(contentId, 0, 50); //Not all nodes are variants & thus culture can be null diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs index 09d91a6436..1a8820c4a0 100644 --- a/src/Umbraco.Web/Editors/ContentControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs @@ -148,7 +148,7 @@ namespace Umbraco.Web.Editors string[] messageParams = null) { //if there's already a default event message, don't add our default one - //fixme inject + //todo inject var msgs = Current.EventMessages; if (msgs != null && msgs.GetAll().Any(x => x.IsDefaultEventMessage)) return; diff --git a/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs b/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs index bbb9e22082..738dd05c75 100644 --- a/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs +++ b/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs @@ -96,7 +96,7 @@ namespace Umbraco.Web.Editors var editorField = configurationEditor.Fields.SingleOrDefault(x => x.Key == field.Key); if (editorField == null) continue; - // run each IValueValidator (with null valueType and dataTypeConfiguration: not relevant here) - fixme - editing + // run each IValueValidator (with null valueType and dataTypeConfiguration: not relevant here) foreach (var validator in editorField.Validators) foreach (var result in validator.Validate(field.Value, null, null)) actionContext.ModelState.AddValidationError(result, "Properties", field.Key); diff --git a/src/Umbraco.Web/Editors/EditorValidator.cs b/src/Umbraco.Web/Editors/EditorValidator.cs index 2010fae943..537ae834d3 100644 --- a/src/Umbraco.Web/Editors/EditorValidator.cs +++ b/src/Umbraco.Web/Editors/EditorValidator.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Editors { var modelType = model.GetType(); - var validationResults = Current.EditorValidators // fixme inject + var validationResults = Current.EditorValidators // todo inject .Where(x => x.ModelType == modelType) .SelectMany(x => x.Validate(model)) .Where(x => !string.IsNullOrWhiteSpace(x.ErrorMessage) && x.MemberNames.Any()); diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 5ff0cac765..b25f3f5af1 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -863,8 +863,6 @@ namespace Umbraco.Web.Editors } } - // fixme - need to implement GetAll for backoffice controllers - dynamics? - public IEnumerable GetAll(UmbracoEntityTypes type, string postFilter, [FromUri]IDictionary postFilterParams) { return GetResultForAll(type, postFilter, postFilterParams); @@ -959,7 +957,7 @@ namespace Umbraco.Web.Editors // if a post filter is assigned then try to execute it if (postFilter.IsNullOrWhiteSpace() == false) { - // fixme - trouble is, we've killed the dynamic Where thing! + // fixme/task/critical - trouble is, we've killed the dynamic Where thing! throw new NotImplementedException("oops"); //return postFilterParams == null // ? entities.AsQueryable().Where(postFilter).ToArray() diff --git a/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs b/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs index f062be1aff..3481c754d3 100644 --- a/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs +++ b/src/Umbraco.Web/Editors/Filters/UserGroupValidateAttribute.cs @@ -27,7 +27,7 @@ namespace Umbraco.Web.Editors.Filters _userService = userService; } - private IUserService UserService => _userService ?? Current.Services.UserService; // fixme inject + private IUserService UserService => _userService ?? Current.Services.UserService; // todo inject public override void OnActionExecuting(HttpActionContext actionContext) { diff --git a/src/Umbraco.Web/Editors/KeepAliveController.cs b/src/Umbraco.Web/Editors/KeepAliveController.cs index b067a5b67e..fa33abea44 100644 --- a/src/Umbraco.Web/Editors/KeepAliveController.cs +++ b/src/Umbraco.Web/Editors/KeepAliveController.cs @@ -4,7 +4,7 @@ using Umbraco.Web.WebApi; namespace Umbraco.Web.Editors { - // fixme + // fixme/task - deal with this // this is not authenticated, and therefore public, and therefore reveals we // are running Umbraco - but, all requests should come from localhost really, // so there should be a way to 404 when the request comes from the outside. diff --git a/src/Umbraco.Web/Editors/MemberController.cs b/src/Umbraco.Web/Editors/MemberController.cs index 36027ee2a5..92ca648c3f 100644 --- a/src/Umbraco.Web/Editors/MemberController.cs +++ b/src/Umbraco.Web/Editors/MemberController.cs @@ -593,7 +593,7 @@ namespace Umbraco.Web.Editors { p.SetValue(valueMapped.GetValue()); - // fixme - ok, I give up, at that point tags are dead here, until we figure it out + // fixme/task - ok, I give up, at that point tags are dead here, until we figure it out //p.TagChanges.Behavior = valueMapped.TagChanges.Behavior; //p.TagChanges.Enable = valueMapped.TagChanges.Enable; //p.TagChanges.Tags = valueMapped.TagChanges.Tags; diff --git a/src/Umbraco.Web/Editors/NuCacheStatusController.cs b/src/Umbraco.Web/Editors/NuCacheStatusController.cs index b9cee665cb..fb4b54c2b2 100644 --- a/src/Umbraco.Web/Editors/NuCacheStatusController.cs +++ b/src/Umbraco.Web/Editors/NuCacheStatusController.cs @@ -32,7 +32,6 @@ namespace Umbraco.Web.Editors [HttpPost] public string RebuildDbCache() { - // fixme - should wrap in a service scope once we have them var service = PublishedSnapshotService; service.RebuildContentDbCache(); service.RebuildMediaDbCache(); diff --git a/src/Umbraco.Web/Editors/PreviewController.cs b/src/Umbraco.Web/Editors/PreviewController.cs index 6e119d68d9..bd14a6c6f4 100644 --- a/src/Umbraco.Web/Editors/PreviewController.cs +++ b/src/Umbraco.Web/Editors/PreviewController.cs @@ -82,13 +82,6 @@ namespace Umbraco.Web.Editors return null; } - ////fixme: not sure we need this anymore since there is no canvas editing - then we can remove that route too - //public ActionResult Editors(string editor) - //{ - // if (string.IsNullOrEmpty(editor)) throw new ArgumentNullException(nameof(editor)); - // return View(_globalSettings.Path.EnsureEndsWith('/') + "Views/Preview/" + editor.Replace(".html", string.Empty) + ".cshtml"); - //} - public ActionResult End(string redir = null) { var previewToken = Request.GetPreviewCookieValue(); diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs index 00e124cb29..38b60f4294 100644 --- a/src/Umbraco.Web/Editors/TemplateQueryController.cs +++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs @@ -67,7 +67,6 @@ namespace Umbraco.Web.Editors sb.Append("Model.Root()"); - //fixme: This timer thing is not correct, it's definitely not timing the resulting query, the timer really isn't important and might as well be removed var timer = new Stopwatch(); timer.Start(); @@ -160,7 +159,7 @@ namespace Umbraco.Web.Editors //trial-run the tokenized clause to time the execution //for review - this uses a tonized query rather then the normal linq query. - // fixme - that cannot work anymore now that we have killed dynamic support + // fixme/task/critical - that cannot work anymore now that we have killed dynamic support //contents = contents.AsQueryable().Where(clause, model.Filters.Select(this.GetConstraintValue).ToArray()); throw new NotImplementedException(); diff --git a/src/Umbraco.Web/Editors/UsersController.cs b/src/Umbraco.Web/Editors/UsersController.cs index 36a8bf1158..e7432c4828 100644 --- a/src/Umbraco.Web/Editors/UsersController.cs +++ b/src/Umbraco.Web/Editors/UsersController.cs @@ -208,7 +208,7 @@ namespace Umbraco.Web.Editors if (!Security.CurrentUser.IsSuper()) { - // only super can see super - but don't use IsSuper, cannot be mapped to SQL - fixme NOW + // only super can see super - but don't use IsSuper, cannot be mapped to SQL //filterQuery.Where(x => !x.IsSuper()); filterQuery.Where(x => x.Id != Constants.Security.SuperUserId); } diff --git a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs index 5962f2cabc..f8c3708e2e 100644 --- a/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs +++ b/src/Umbraco.Web/HealthCheck/HealthCheckResults.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.HealthCheck private readonly Dictionary> _results; public readonly bool AllChecksSuccessful; - private ILogger Logger => Current.Logger; // fixme inject + private ILogger Logger => Current.Logger; // todo inject public HealthCheckResults(IEnumerable checks) { diff --git a/src/Umbraco.Web/Install/InstallStepCollection.cs b/src/Umbraco.Web/Install/InstallStepCollection.cs index ffbd3f10cb..d5c32d0ce6 100644 --- a/src/Umbraco.Web/Install/InstallStepCollection.cs +++ b/src/Umbraco.Web/Install/InstallStepCollection.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.Install { _installHelper = installHelper; - // fixme this is ugly but I have a branch where it's nicely refactored - for now we just want to manage ordering + // todo this is ugly but I have a branch where it's nicely refactored - for now we just want to manage ordering var a = installerSteps.ToArray(); _orderedInstallerSteps = new InstallSetupStep[] { diff --git a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs index 8c168f7230..80fda66661 100644 --- a/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/StarterKitCleanupStep.cs @@ -26,7 +26,7 @@ namespace Umbraco.Web.Install.InstallSteps { packageFile = HttpUtility.UrlDecode(packageFile); - //fixme: When does the zip file get deleted? + //todo: When does the zip file get deleted? } public override bool RequiresExecution(object model) diff --git a/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs b/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs index 5f44555092..1477105797 100644 --- a/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/UpgradeStep.cs @@ -20,7 +20,7 @@ namespace Umbraco.Web.Install.InstallSteps { get { - // fixme - if UmbracoVersion.Local is null? + // todo- if UmbracoVersion.Local is null? // it means that there is a database but the web.config version is cleared // that was a "normal" way to force the upgrader to execute, and we would detect the current // version via the DB like DatabaseSchemaResult.DetermineInstalledVersion - magic, do we really @@ -37,7 +37,7 @@ namespace Umbraco.Web.Install.InstallSteps return value; } - var state = Current.RuntimeState; // fixme inject + var state = Current.RuntimeState; // todo inject var currentState = FormatGuidState(state.CurrentMigrationState); var newState = FormatGuidState(state.FinalMigrationState); diff --git a/src/Umbraco.Web/Install/Models/InstallPackageModel.cs b/src/Umbraco.Web/Install/Models/InstallPackageModel.cs index 3ab74fa5e4..10335c48fc 100644 --- a/src/Umbraco.Web/Install/Models/InstallPackageModel.cs +++ b/src/Umbraco.Web/Install/Models/InstallPackageModel.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Umbraco.Web.Install.Models { - //fixme: do we need this? + //todo : do we need this? [Obsolete("This is only used for the obsolete controller InstallPackageController")] [DataContract(Name = "installPackage", Namespace = "")] public class InstallPackageModel diff --git a/src/Umbraco.Web/Logging/WebProfiler.cs b/src/Umbraco.Web/Logging/WebProfiler.cs index 77b57e768d..e31ef75209 100755 --- a/src/Umbraco.Web/Logging/WebProfiler.cs +++ b/src/Umbraco.Web/Logging/WebProfiler.cs @@ -47,7 +47,7 @@ namespace Umbraco.Web.Logging { // if this is the boot request, or if we should profile this request, stop // (the boot request is always profiled, no matter what) - var isBootRequest = ((HttpApplication) sender).Context.Items[BootRequestItemKey] != null; // fixme perfs + var isBootRequest = ((HttpApplication) sender).Context.Items[BootRequestItemKey] != null; if (isBootRequest) _provider.EndBootRequest(); if (isBootRequest || ShouldProfile(sender)) diff --git a/src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs b/src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs deleted file mode 100644 index 6cba6ff6ab..0000000000 --- a/src/Umbraco.Web/Models/Mapping/ContentItemDisplayNameResolver.cs +++ /dev/null @@ -1,23 +0,0 @@ -//using AutoMapper; -//using Umbraco.Core; -//using Umbraco.Core.Models; -//using Umbraco.Web.Models.ContentEditing; -//using ContentVariation = Umbraco.Core.Models.ContentVariation; - -// fixme remove this file? -//namespace Umbraco.Web.Models.Mapping -//{ -// /// -// /// Used to map the name from an depending on it's variation settings -// /// -// internal class ContentItemDisplayNameResolver : IValueResolver -// { -// public string Resolve(IContent source, ContentVariationDisplay destination, string destMember, ResolutionContext context) -// { -// var culture = context.GetCulture(); -// return source.ContentType.VariesByCulture() && culture != null -// ? source.GetCultureName(culture) -// : source.Name; -// } -// } -//} diff --git a/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs b/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs index 2f7590d6fd..3c2dd01c9c 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.Models.Mapping var config = DataTypeService.GetDataType(originalProp.PropertyType.DataTypeId).Configuration; - // fixme - IDataValueEditor configuration - general issue + // todo - IDataValueEditor configuration - general issue // GetValueEditor() returns a non-configured IDataValueEditor // - for richtext and nested, configuration determines HideLabel, so we need to configure the value editor // - could configuration also determines ValueType, everywhere? diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs index 1348dbb8a9..ba8076b457 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeProfileExtensions.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models.Mapping where TPropertyTypeBasic : PropertyTypeBasic { return mapping - .ConstructUsing(x => new PropertyGroup(false)) // fixme - we have NO idea of isPublishing here = wtf? + .ConstructUsing(x => new PropertyGroup(false)) // todo - we have NO idea of isPublishing here = wtf? .IgnoreEntityCommonProperties() .ForMember(dest => dest.Id, map => map.Condition(src => src.Id > 0)) .ForMember(dest => dest.Key, map => map.Ignore()) @@ -160,7 +160,7 @@ namespace Umbraco.Web.Models.Mapping where TDestination : IContentTypeComposition where TSourcePropertyType : PropertyTypeBasic { - // fixme not so clean really + // todo not so clean really var isPublishing = typeof(IContentType).IsAssignableFrom(typeof(TDestination)); mapping = mapping diff --git a/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs b/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs index bdfc870a2f..c8fc9ea4b2 100644 --- a/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/DatabaseTypeResolver.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.Models.Mapping if (!Current.PropertyEditors.TryGet(source.EditorAlias, out var editor)) throw new InvalidOperationException($"Could not find property editor \"{source.EditorAlias}\"."); - // fixme - what about source.PropertyEditor? can we get the configuration here? 'cos it may change the storage type?! + // todo - what about source.PropertyEditor? can we get the configuration here? 'cos it may change the storage type?! var valueType = editor.GetValueEditor().ValueType; return ValueTypes.ToStorageType(valueType); } diff --git a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs index ff7fcfc0b0..8f99fe03dc 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs @@ -204,7 +204,7 @@ namespace Umbraco.Web.Models.Mapping // if there's no culture here, the issue is somewhere else (UI, whatever) - throw! if (culture == null) //throw new InvalidOperationException("Missing culture in mapping options."); - // fixme we should throw, but this is used in various places that won't set a culture yet + // todo we should throw, but this is used in various places that won't set a culture yet return source.Name; // if we don't have a name for a culture, it means the culture is not available, and diff --git a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs index 7bede52021..a50a4f190e 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/MacroMapperProfile.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.Models.Mapping { //map the view and the config // we need to show the depracated ones for backwards compatibility - var paramEditor = Current.ParameterEditors[property.EditorAlias]; // fixme - include/filter deprecated?! + var paramEditor = Current.ParameterEditors[property.EditorAlias]; // todo - include/filter deprecated?! if (paramEditor == null) { //we'll just map this to a text box diff --git a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs index f64121e09a..e32531e61a 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesResolver.cs @@ -139,7 +139,7 @@ namespace Umbraco.Web.Models.Mapping // only when creating a new member and we want to have a generated password pre-filled. Value = new Dictionary { - // fixme why ignoreCase, what are we doing here?! + // todo why ignoreCase, what are we doing here?! {"generatedPassword", member.GetAdditionalDataValueIgnoreCase("GeneratedPassword", null)}, {"newPassword", member.GetAdditionalDataValueIgnoreCase("NewPassword", null)}, }, diff --git a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs index d0218b6639..3d285eb88a 100644 --- a/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs +++ b/src/Umbraco.Web/Models/PublishedContent/PublishedValueFallback.cs @@ -261,7 +261,7 @@ namespace Umbraco.Web.Models.PublishedContent var visited = new HashSet(); - // fixme + // todo // _localizationService.GetXxx() is expensive, it deep clones objects // we want _localizationService.GetReadOnlyXxx() returning IReadOnlyLanguage which cannot be saved back = no need to clone diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs index 2d00370f14..c772f6ca85 100644 --- a/src/Umbraco.Web/Models/PublishedContentBase.cs +++ b/src/Umbraco.Web/Models/PublishedContentBase.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Models [DebuggerDisplay("Content Id: {Id}, Name: {Name}")] public abstract class PublishedContentBase : IPublishedContent { - private string _url; // fixme - cannot cache urls, they depends on the current request + private string _url; // fixme/task - cannot cache urls, they depends on the current request #region ContentType @@ -79,12 +79,12 @@ namespace Umbraco.Web.Models /// The url of documents are computed by the document url providers. The url of medias are, at the moment, /// computed here from the 'umbracoFile' property -- but we should move to media url providers at some point. /// - public virtual string GetUrl(string culture = null) // fixme - consider .GetCulture("fr-FR").Url + public virtual string GetUrl(string culture = null) // todo - consider .GetCulture("fr-FR").Url { switch (ItemType) { case PublishedItemType.Content: - // fixme - consider injecting an umbraco context accessor + // todo - consider injecting an umbraco context accessor if (UmbracoContext.Current == null) throw new InvalidOperationException("Cannot compute Url for a content item when UmbracoContext.Current is null."); if (UmbracoContext.Current.UrlProvider == null) @@ -103,7 +103,7 @@ namespace Umbraco.Web.Models var propType = ContentType.GetPropertyType(Constants.Conventions.Media.File); - // fixme - consider implementing media url providers + // todo - consider implementing media url providers // note: that one does not support variations //This is a hack - since we now have 2 properties that support a URL: upload and cropper, we need to detect this since we always // want to return the normal URL and the cropper stores data as json diff --git a/src/Umbraco.Web/Models/PublishedProperty.cs b/src/Umbraco.Web/Models/PublishedProperty.cs index b3bad63609..05d6b5cfe0 100644 --- a/src/Umbraco.Web/Models/PublishedProperty.cs +++ b/src/Umbraco.Web/Models/PublishedProperty.cs @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models var propertyEditors = Current.PropertyEditors; var dataTypeService = Current.Services.DataTypeService; - // fixme not dealing with variants + // todo not dealing with variants // but the entire thing should die anyways return propertyTypes.Select(x => diff --git a/src/Umbraco.Web/Mvc/RenderMvcController.cs b/src/Umbraco.Web/Mvc/RenderMvcController.cs index 4d47e2b82a..e5ad2bb01e 100644 --- a/src/Umbraco.Web/Mvc/RenderMvcController.cs +++ b/src/Umbraco.Web/Mvc/RenderMvcController.cs @@ -18,7 +18,6 @@ namespace Umbraco.Web.Mvc { private PublishedRequest _publishedRequest; - // fixme - delete? public RenderMvcController() { ActionInvoker = new RenderActionInvoker(); diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index 29e861aec4..c9123175b1 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -44,7 +44,7 @@ namespace Umbraco.Web.Mvc private UmbracoContext UmbracoContext => _umbracoContext ?? _umbracoContextAccessor.UmbracoContext; - private UmbracoFeatures Features => Current.Factory.GetInstance(); // fixme inject + private UmbracoFeatures Features => Current.Factory.GetInstance(); // todo inject #region IRouteHandler Members diff --git a/src/Umbraco.Web/Mvc/SurfaceController.cs b/src/Umbraco.Web/Mvc/SurfaceController.cs index bf9946a6a0..2bf73b7dd1 100644 --- a/src/Umbraco.Web/Mvc/SurfaceController.cs +++ b/src/Umbraco.Web/Mvc/SurfaceController.cs @@ -16,15 +16,12 @@ namespace Umbraco.Web.Mvc [MergeParentContextViewData] public abstract class SurfaceController : PluginController { - // fixme - delete? protected SurfaceController() - { - } + { } protected SurfaceController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger) : base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger) - { - } + { } /// /// Redirects to the Umbraco page with the given id diff --git a/src/Umbraco.Web/Mvc/UmbracoController.cs b/src/Umbraco.Web/Mvc/UmbracoController.cs index 5ba976efbf..4d70263cb8 100644 --- a/src/Umbraco.Web/Mvc/UmbracoController.cs +++ b/src/Umbraco.Web/Mvc/UmbracoController.cs @@ -22,14 +22,6 @@ namespace Umbraco.Web.Mvc // for debugging purposes internal Guid InstanceId { get; } = Guid.NewGuid(); - // note - // properties marked as [Inject] below will be property-injected (vs constructor-injected) in - // order to keep the constuctor as light as possible, so that ppl implementing eg a SurfaceController - // don't need to implement complex constructors + need to refactor them each time we change ours. - // this means that these properties have a setter. - // what can go wrong? - // fixme clear this comment - /// /// Gets or sets the Umbraco context. /// diff --git a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs index bda8e4518e..806a4bd250 100644 --- a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs +++ b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs @@ -41,7 +41,7 @@ namespace Umbraco.Web.Mvc /// public AppCaches AppCaches { get; set; } - // fixme + // todo // previously, Services and ApplicationCache would derive from UmbracoContext.Application, which // was an ApplicationContext - so that everything derived from UmbracoContext. // UmbracoContext is fetched from the data tokens, thus allowing the view to be rendered with a diff --git a/src/Umbraco.Web/Properties/AssemblyInfo.cs b/src/Umbraco.Web/Properties/AssemblyInfo.cs index 1709204920..9a1b248284 100644 --- a/src/Umbraco.Web/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Web/Properties/AssemblyInfo.cs @@ -16,10 +16,6 @@ using System.Runtime.InteropServices; [assembly: InternalsVisibleTo("Umbraco.Tests")] [assembly: InternalsVisibleTo("Umbraco.Tests.Benchmarks")] -[assembly: InternalsVisibleTo("Umbraco.VisualStudio")] // fixme - what is this? -[assembly: InternalsVisibleTo("Umbraco.ModelsBuilder")] // fixme - why? -[assembly: InternalsVisibleTo("Umbraco.ModelsBuilder.AspNet")] // fixme - why? - // Allow this to be mocked in our unit tests [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] diff --git a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs index b471a42266..c238f93467 100644 --- a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs @@ -8,11 +8,11 @@ namespace Umbraco.Web.PropertyEditors /// public class GridConfiguration { - //fixme: Make these strongly typed, for now this works though + //todo: Make these strongly typed, for now this works though [ConfigurationField("items", "Grid", "views/propertyeditors/grid/grid.prevalues.html", Description = "Grid configuration")] public JObject Items { get; set; } - //fixme: Make these strongly typed, for now this works though + //todo: Make these strongly typed, for now this works though [ConfigurationField("rte", "Rich text editor", "views/propertyeditors/rte/rte.prevalues.html", Description = "Rich text editor configuration")] public JObject Rte { get; set; } } diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index 70b705f397..2ca58b06e2 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.PropertyEditors _contentSettings = contentSettings ?? throw new ArgumentNullException(nameof(contentSettings)); _dataTypeService = dataTypeService; - //fixme: inject? + //todo: inject? _autoFillProperties = new UploadAutoFillProperties(_mediaFileSystem, logger, _contentSettings); } diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs index 88da8982c7..6ee0d23d95 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -16,7 +16,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The value editor for the image cropper property editor. /// - internal class ImageCropperPropertyValueEditor : DataValueEditor // fixme core vs web? + internal class ImageCropperPropertyValueEditor : DataValueEditor // todo core vs web? { private readonly ILogger _logger; private readonly IMediaFileSystem _mediaFileSystem; diff --git a/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs b/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs index 507251043b..1b46a7a8a8 100644 --- a/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs @@ -62,7 +62,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("bulkActionPermissions", "Bulk Action Permissions", "views/propertyeditors/listview/bulkactionpermissions.prevalues.html", Description = "The bulk actions that are allowed from the list view")] - public BulkActionPermissionSettings BulkActionPermissions { get; set; } = new BulkActionPermissionSettings(); // fixme managing defaults? + public BulkActionPermissionSettings BulkActionPermissions { get; set; } = new BulkActionPermissionSettings(); // todomanaging defaults? [ConfigurationField("tabName", "Tab Name", "textstring", Description = "The name of the listview tab (default if empty: 'Child Items')")] public string TabName { get; set; } @@ -76,7 +76,7 @@ namespace Umbraco.Web.PropertyEditors public string Header { get; set; } [JsonProperty("isSystem")] - public int IsSystem { get; set; } // fixme bool + public int IsSystem { get; set; } // todo bool } public class Layout @@ -91,7 +91,7 @@ namespace Umbraco.Web.PropertyEditors public string Icon { get; set; } [JsonProperty("isSystem")] - public int IsSystem { get; set; } // fixme bool + public int IsSystem { get; set; } // todo bool [JsonProperty("selected")] public bool Selected { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs index 1417e5ebb2..77c5c04985 100644 --- a/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MacroContainerPropertyEditor.cs @@ -4,7 +4,7 @@ using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { - // fixme - MacroContainerPropertyEditor is deprecated, but what's the alternative? + // todo - MacroContainerPropertyEditor is deprecated, but what's the alternative? [DataEditor(Constants.PropertyEditors.Aliases.MacroContainer, "(Obsolete) Macro Picker", "macrocontainer", ValueType = ValueTypes.Text, Group="rich content", Icon="icon-settings-alt", IsDeprecated = true)] public class MacroContainerPropertyEditor : DataEditor { diff --git a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs index a76d844dd6..59a96a0e41 100644 --- a/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/MultipleTextStringConfigurationEditor.cs @@ -34,7 +34,7 @@ namespace Umbraco.Web.PropertyEditors /// public override MultipleTextStringConfiguration FromConfigurationEditor(IDictionary editorValues, MultipleTextStringConfiguration configuration) { - // fixme this isn't pretty + // todo this isn't pretty //the values from the editor will be min/max fieds and we need to format to json in one field // is the editor sending strings or ints or?! var min = (editorValues.ContainsKey("min") ? editorValues["min"].ToString() : "0").TryConvertTo(); @@ -57,4 +57,4 @@ namespace Umbraco.Web.PropertyEditors }; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs index 74c8744ead..7ff6439e08 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs @@ -42,8 +42,6 @@ namespace Umbraco.Web.PropertyEditors : Current.Services.ContentTypeService.Get(contentTypeAlias); } - //fixme: Need to add a custom IPropertyIndexValueFactory for this editor - #region Pre Value Editor protected override IConfigurationEditor CreateConfigurationEditor() => new NestedContentConfigurationEditor(); diff --git a/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs b/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs index 43053addd4..df29687838 100644 --- a/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/RichTextConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors /// public class RichTextConfiguration { - //fixme: Make these strongly typed, for now this works though + //todo: Make these strongly typed, for now this works though [ConfigurationField("editor", "Editor", "views/propertyeditors/rte/rte.prevalues.html", HideLabel = true)] public JObject Editor { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs b/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs index 6d962c42f1..1089f3d5aa 100644 --- a/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs +++ b/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors public class TrueFalseConfiguration { [ConfigurationField("default", "Default Value", "boolean")] - public string Default { get; set; } // fixme - well, true or false?! + public string Default { get; set; } // todo - well, true or false?! [ConfigurationField("labelOn", "Write a label text", "textstring")] public string Label { get; set; } diff --git a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs index de92654ffb..155e59133d 100644 --- a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs +++ b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs @@ -209,7 +209,7 @@ namespace Umbraco.Web.PublishedCache /// The alias is case-insensitive. PublishedContentType GetContentType(string alias); - // fixme - can we implement this, now? maybe only with NuCache else will throw NotImplemented... + // todo - can we implement this, now? maybe only with NuCache else will throw NotImplemented... IEnumerable GetByContentType(PublishedContentType contentType); } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index 566ab240c1..44d38c8f3a 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -29,7 +29,7 @@ namespace Umbraco.Web.PublishedCache.NuCache #region Constructor - // fixme ISSUE + // todo - figure this out // after the current snapshot has been resync-ed // it's too late for UmbracoContext which has captured previewDefault and stuff into these ctor vars // but, no, UmbracoContext returns snapshot.Content which comes from elements SO a resync should create a new cache diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs index 2c2101b066..647adaad91 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentNode.cs @@ -116,7 +116,7 @@ namespace Umbraco.Web.PublishedCache.NuCache Draft = originDraft == null ? null : new PublishedContent(this, originDraft._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); Published = originPublished == null ? null : new PublishedContent(this, originPublished._contentData, publishedSnapshotAccessor, variationContextAccessor).CreateModel(); - ChildContentIds = origin.ChildContentIds; // can be the *same* list FIXME oh really? + ChildContentIds = origin.ChildContentIds; // can be the *same* list } // everything that is common to both draft and published versions diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs index ca5a5db88c..0cf2c231b5 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentStore.cs @@ -38,7 +38,7 @@ namespace Umbraco.Web.PublishedCache.NuCache private volatile int _wlocked; private List> _wchanges; - // fixme - collection trigger (ok for now) + // todo - collection trigger (ok for now) // see SnapDictionary notes private const long CollectMinGenDelta = 8; @@ -104,7 +104,7 @@ namespace Umbraco.Web.PublishedCache.NuCache } // gets a scope contextual representing a locked writer to the dictionary - // fixme GetScopedWriter? should the dict have a ref onto the scope provider? + // todo GetScopedWriter? should the dict have a ref onto the scope provider? public IDisposable GetWriter(IScopeProvider scopeProvider) { return ScopeContextualBase.Get(scopeProvider, _instanceId, scoped => new ContentStoreWriter(this, scoped)); diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs index ccd0e18dd7..ddf9023d84 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs @@ -36,7 +36,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource // write each variation foreach (var (culture, variation) in variations) { - // fixme - it's weird we're dealing with cultures here, and languageId in properties + // todo - it's weird we're dealing with cultures here, and languageId in properties PrimitiveSerializer.String.WriteTo(culture, stream); // should never be null WriteObject(variation.Name, stream); // write an object in case it's null (though... should not happen) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs index 4531d37b2b..8e9e86b4fc 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/DatabaseDataSource.cs @@ -15,7 +15,7 @@ using static Umbraco.Core.Persistence.NPocoSqlExtensions.Statics; namespace Umbraco.Web.PublishedCache.NuCache.DataSource { - // fixme - use SqlTemplate for these queries else it's going to be horribly slow! + // todo - use SqlTemplate for these queries else it's going to be horribly slow! // provides efficient database access for NuCache internal class DatabaseDataSource : IDataSource diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs index 4317a9b1ee..9e50f50c86 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/PropertyData.cs @@ -12,14 +12,14 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource public string Culture { get => _culture; - set => _culture = value ?? throw new ArgumentNullException(nameof(value)); // fixme or fallback to string.Empty? CANNOT be null + set => _culture = value ?? throw new ArgumentNullException(nameof(value)); // todo or fallback to string.Empty? CANNOT be null } [JsonProperty("seg")] public string Segment { get => _segment; - set => _segment = value ?? throw new ArgumentNullException(nameof(value)); // fixme or fallback to string.Empty? CANNOT be null + set => _segment = value ?? throw new ArgumentNullException(nameof(value)); // todo or fallback to string.Empty? CANNOT be null } [JsonProperty("val")] diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 1c1f7d034e..fc79971982 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -367,7 +367,6 @@ - diff --git a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs index f4bd7dd4fc..94e1b6e923 100644 --- a/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs +++ b/src/Umbraco.Web/_Legacy/PackageActions/publishRootDocument.cs @@ -35,7 +35,7 @@ namespace Umbraco.Web._Legacy.PackageActions { if (rootDoc.Name.Trim() == documentName.Trim() && rootDoc.ContentType != null) { - // fixme variants? + // todo variants? Current.Services.ContentService.SaveAndPublishBranch(rootDoc, true); break; }