diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f446c4cf7e..4dfa5a83b9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,7 @@ name: "Code scanning - action" on: push: - branches: [v8/contrib,v8/dev] + branches: [v8/contrib,v8/dev,v8/bug,v8/feature] pull_request: # The branches below must be a subset of the branches above schedule: diff --git a/.github/workflows/codeql-config.yml b/.github/workflows/codeql-config.yml index afb05e76d2..59b55e48ec 100644 --- a/.github/workflows/codeql-config.yml +++ b/.github/workflows/codeql-config.yml @@ -1,4 +1,7 @@ name: "CodeQL config" +on: + push: + branches: [v8/contrib,v8/dev] paths-ignore: - node_modules - Umbraco.TestData diff --git a/src/Umbraco.Web.UI.Client/gulp/tasks/test.js b/src/Umbraco.Web.UI.Client/gulp/tasks/test.js index 255fe17435..b5239d35e7 100644 --- a/src/Umbraco.Web.UI.Client/gulp/tasks/test.js +++ b/src/Umbraco.Web.UI.Client/gulp/tasks/test.js @@ -23,7 +23,6 @@ function runUnitTestServer() { autoWatch: true, port: 9999, singleRun: false, - browsers: ['ChromeDebugging'], keepalive: true }) .start(); diff --git a/src/Umbraco.Web.UI.Client/gulpfile.js b/src/Umbraco.Web.UI.Client/gulpfile.js index d272c77397..547b77cc7b 100644 --- a/src/Umbraco.Web.UI.Client/gulpfile.js +++ b/src/Umbraco.Web.UI.Client/gulpfile.js @@ -6,11 +6,11 @@ * =========== * This is now using Gulp 4, each child task is now a child function in its own corresponding file. * - * To add a new task, simply add a new task file to gulp/tasks folder, add a require statement below to include the one or more methods + * To add a new task, simply add a new task file to gulp/tasks folder, add a require statement below to include the one or more methods * and then add the exports command to add the new item into the task menu. */ -const { src, dest, series, parallel, lastRun } = require('gulp'); +const { series, parallel } = require('gulp'); const config = require('./gulp/config'); const { setDevelopmentMode, setTestMode } = require('./gulp/modes'); @@ -28,9 +28,9 @@ config.compile.current = config.compile.build; // These Exports are the new way of defining Tasks in Gulp 4.x // *********************************************************** exports.build = series(parallel(dependencies, js, less, views), testUnit); -exports.dev = series(setDevelopmentMode, parallel(dependencies, js, less, views), watchTask); +exports.dev = series(setDevelopmentMode, parallel(dependencies, js, less, views), runUnitTestServer, watchTask); exports.watch = series(watchTask); -// +// exports.runTests = series(setTestMode, series(js, testUnit)); exports.runUnit = series(setTestMode, series(js, runUnitTestServer), watchTask); exports.testE2e = series(setTestMode, parallel(testE2e)); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 826d6b87fc..f2dc0622c7 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -2,7 +2,7 @@ 'use strict'; function ContentEditController($rootScope, $scope, $routeParams, $q, $window, - appState, contentResource, entityResource, navigationService, notificationsService, + appState, contentResource, entityResource, navigationService, notificationsService, contentAppHelper, serverValidationManager, contentEditingHelper, localizationService, formHelper, umbRequestHelper, editorState, $http, eventsService, overlayService, $location, localStorageService, treeService, $exceptionHandler) { @@ -282,7 +282,7 @@ $scope.page.saveButtonStyle = content.trashed || content.isElement || isBlueprint ? "primary" : "info"; // only create the save/publish/preview buttons if the // content app is "Conent" - if ($scope.activeApp && $scope.activeApp.alias !== "umbContent" && $scope.activeApp.alias !== "umbInfo" && $scope.activeApp.alias !== "umbListView") { + if ($scope.activeApp && !contentAppHelper.isContentBasedApp($scope.activeApp)) { $scope.defaultButton = null; $scope.subButtons = null; $scope.page.showSaveButton = false; diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js index eb9971d83a..55e66c5706 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontent.directive.js @@ -24,7 +24,7 @@ controller: umbVariantContentController }; - function umbVariantContentController($scope) { + function umbVariantContentController($scope, contentAppHelper) { var unsubscribe = []; @@ -110,7 +110,7 @@ function onAppChanged(activeApp) { // disable the name field if the active content app is not "Content" or "Info" - vm.nameDisabled = (activeApp && activeApp.alias !== "umbContent" && activeApp.alias !== "umbInfo" && activeApp.alias !== "umbListView"); + vm.nameDisabled = (activeApp && !contentAppHelper.isContentBasedApp(activeApp)); } /** diff --git a/src/Umbraco.Web.UI.Client/src/common/services/contentapphelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/contentapphelper.service.js new file mode 100644 index 0000000000..0b3dc2c6e0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/services/contentapphelper.service.js @@ -0,0 +1,35 @@ + +/** +* @ngdoc service +* @name umbraco.services.contentAppHelper +* @description A helper service for content app related functions. +**/ +function contentAppHelper() { + + var service = {}; + + /** + * Default known content based apps. + */ + service.CONTENT_BASED_APPS = [ "umbContent", "umbInfo", "umbListView" ]; + + /** + * @ngdoc method + * @name umbraco.services.contentAppHelper#isContentBasedApp + * @methodOf umbraco.services.contentAppHelper + * + * @param {object} app A content app to check + * + * @description + * Determines whether the supplied content app is a known content based app + * + */ + service.isContentBasedApp = function (app) { + return service.CONTENT_BASED_APPS.indexOf(app.alias) !== -1; + } + + return service; + +} + +angular.module('umbraco.services').factory('contentAppHelper', contentAppHelper); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js index 37485ea7eb..9ba4d2964b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js @@ -135,7 +135,7 @@ function treeService($q, treeResource, iconHelper, notificationsService, eventsS if (treeNode.iconIsClass === undefined || treeNode.iconIsClass) { var converted = iconHelper.convertFromLegacyTreeNodeIcon(treeNode); treeNode.cssClass = standardCssClass + " " + converted; - if (converted.startsWith('.')) { + if (converted && converted.startsWith('.')) { //its legacy so add some width/height treeNode.style = "height:16px;width:16px;"; } diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less index 939fd79826..ac7277109a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-node-preview.less @@ -28,8 +28,6 @@ .umb-node-preview__icon { display: flex; - width: 25px; - min-height: 25px; height: 100%; justify-content: center; align-items: center; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html index d534cd77ed..022c140a2f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html @@ -1,6 +1,6 @@ 
-
+
{{ group.label }}
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/elementeditor/umb-element-editor-content.component.html b/src/Umbraco.Web.UI.Client/src/views/components/elementeditor/umb-element-editor-content.component.html index fae639562f..ecbe880eee 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/elementeditor/umb-element-editor-content.component.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/elementeditor/umb-element-editor-content.component.html @@ -2,7 +2,7 @@
+ ng-repeat="group in vm.model.variants[0].tabs track by group.id">
{{ group.label }}
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/member/umb-member-node-info.html b/src/Umbraco.Web.UI.Client/src/views/components/member/umb-member-node-info.html index 0dceeb4c26..5162caf13c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/member/umb-member-node-info.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/member/umb-member-node-info.html @@ -1,7 +1,7 @@
- +
{{ group.label }}
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html index 14ca023046..dff62ee1eb 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html @@ -22,7 +22,7 @@ - +
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html index 2ebb77fa7c..a7daa57775 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html @@ -1,85 +1,75 @@
- + +
-
{{ name }}
-
{{ description }}
+
{{name}}
+
{{description}}
Permissions: - {{ permission.name }} + {{permission.name}}
- - + + + Edit {{name}} - - - + + Open {{name}} - - - + + Remove {{name}} - diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js index 03ffcfd09d..d22738b676 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js @@ -12,7 +12,7 @@ function DictionaryCreateController($scope, $location, dictionaryResource, navig vm.itemKey = ""; vm.createItem = createItem; - + $scope.$emit("$changeTitle", ""); function createItem() { if (formHelper.submitForm({ scope: $scope, formCtrl: $scope.createDictionaryForm })) { diff --git a/src/Umbraco.Web.UI.Client/src/views/media/apps/content/content.html b/src/Umbraco.Web.UI.Client/src/views/media/apps/content/content.html index 633eccdf62..816ca987f7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/apps/content/content.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/apps/content/content.html @@ -1,5 +1,5 @@
-
+
{{ group.label }}
diff --git a/src/Umbraco.Web.UI.Client/src/views/member/apps/content/content.html b/src/Umbraco.Web.UI.Client/src/views/member/apps/content/content.html index 1256c2d234..29051cd855 100644 --- a/src/Umbraco.Web.UI.Client/src/views/member/apps/content/content.html +++ b/src/Umbraco.Web.UI.Client/src/views/member/apps/content/content.html @@ -1,6 +1,6 @@
-
+
{{ group.label }}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html index a1ff49c883..9bf32675e3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html @@ -17,20 +17,20 @@
  • -
    +
    + + + +
    - {{template.name}}
    +

    {{template.name}}

  • @@ -64,23 +64,23 @@
  • -
    +
    + + {{area.maxItems}} + + + +
    - {{layout.label || layout.name}}
    +

    {{layout.label || layout.name}}

    diff --git a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs index d80affbfa9..ac5719c015 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs @@ -33,15 +33,16 @@ namespace Umbraco.Web.PublishedCache.NuCache _urlSegment = ContentData.UrlSegment; IsPreviewing = ContentData.Published == false; - var properties = new List(); + var properties = new IPublishedProperty[_contentNode.ContentType.PropertyTypes.Count()]; + int i =0; foreach (var propertyType in _contentNode.ContentType.PropertyTypes) { // add one property per property type - this is required, for the indexing to work // if contentData supplies pdatas, use them, else use null contentData.Properties.TryGetValue(propertyType.Alias, out var pdatas); // else will be null - properties.Add(new Property(propertyType, this, pdatas, _publishedSnapshotAccessor)); + properties[i++] =new Property(propertyType, this, pdatas, _publishedSnapshotAccessor); } - PropertiesArray = properties.ToArray(); + PropertiesArray = properties; } private string GetProfileNameById(int id) diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index 6a2fba1152..d73f98b6b5 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -141,7 +141,7 @@ namespace Umbraco.Web /// public IHtmlString RenderTemplate(int contentId, int? altTemplateId = null) { - return ComponentRenderer.RenderTemplate(contentId, altTemplateId); + return _componentRenderer.RenderTemplate(contentId, altTemplateId); } #region RenderMacro @@ -153,7 +153,7 @@ namespace Umbraco.Web /// public IHtmlString RenderMacro(string alias) { - return ComponentRenderer.RenderMacro(AssignedContentItem?.Id ?? 0, alias, null); + return _componentRenderer.RenderMacro(AssignedContentItem?.Id ?? 0, alias, null); } /// @@ -164,7 +164,7 @@ namespace Umbraco.Web /// public IHtmlString RenderMacro(string alias, object parameters) { - return ComponentRenderer.RenderMacro(AssignedContentItem?.Id ?? 0, alias, parameters?.ToDictionary()); + return _componentRenderer.RenderMacro(AssignedContentItem?.Id ?? 0, alias, parameters?.ToDictionary()); } /// @@ -175,7 +175,7 @@ namespace Umbraco.Web /// public IHtmlString RenderMacro(string alias, IDictionary parameters) { - return ComponentRenderer.RenderMacro(AssignedContentItem?.Id ?? 0, alias, parameters); + return _componentRenderer.RenderMacro(AssignedContentItem?.Id ?? 0, alias, parameters); } #endregion @@ -212,7 +212,7 @@ namespace Umbraco.Web /// Returns the ICultureDictionary for access to dictionary items /// public ICultureDictionary CultureDictionary => _cultureDictionary - ?? (_cultureDictionary = CultureDictionaryFactory.CreateDictionary()); + ?? (_cultureDictionary = _cultureDictionaryFactory.CreateDictionary()); #endregion @@ -225,7 +225,7 @@ namespace Umbraco.Web /// True if the current user has access or if the current document isn't protected public bool MemberHasAccess(string path) { - return MembershipHelper.MemberHasAccess(path); + return _membershipHelper.MemberHasAccess(path); } /// @@ -234,7 +234,7 @@ namespace Umbraco.Web /// True is the current user is logged in public bool MemberIsLoggedOn() { - return MembershipHelper.IsLoggedIn(); + return _membershipHelper.IsLoggedIn(); } #endregion @@ -275,7 +275,7 @@ namespace Umbraco.Web public IPublishedContent Member(Guid id) { - return MembershipHelper.GetById(id); + return _membershipHelper.GetById(id); } public IPublishedContent Member(object id) @@ -291,18 +291,18 @@ namespace Umbraco.Web public IPublishedContent Member(int id) { - return MembershipHelper.GetById(id); + return _membershipHelper.GetById(id); } public IPublishedContent Member(string id) { var asInt = id.TryConvertTo(); - return asInt ? MembershipHelper.GetById(asInt.Result) : MembershipHelper.GetByProviderKey(id); + return asInt ? _membershipHelper.GetById(asInt.Result) : _membershipHelper.GetByProviderKey(id); } public IEnumerable Members(IEnumerable ids) { - return MembershipHelper.GetByIds(ids); + return _membershipHelper.GetByIds(ids); } public IEnumerable Members(IEnumerable ids) @@ -312,7 +312,7 @@ namespace Umbraco.Web public IEnumerable Members(IEnumerable ids) { - return MembershipHelper.GetByIds(ids); + return _membershipHelper.GetByIds(ids); } public IEnumerable Members(IEnumerable ids) @@ -337,7 +337,7 @@ namespace Umbraco.Web public IEnumerable Members(params Guid[] ids) { - return MembershipHelper.GetByIds(ids); + return _membershipHelper.GetByIds(ids); } public IEnumerable Members(params Udi[] ids) @@ -367,11 +367,11 @@ namespace Umbraco.Web private IPublishedContent ContentForObject(object id) { if (ConvertIdObjectToInt(id, out var intId)) - return ContentQuery.Content(intId); + return _publishedContentQuery.Content(intId); if (ConvertIdObjectToGuid(id, out var guidId)) - return ContentQuery.Content(guidId); + return _publishedContentQuery.Content(guidId); if (ConvertIdObjectToUdi(id, out var udiId)) - return ContentQuery.Content(udiId); + return _publishedContentQuery.Content(udiId); return null; } @@ -382,7 +382,7 @@ namespace Umbraco.Web /// The content, or null of the content item is not in the cache. public IPublishedContent Content(int id) { - return ContentQuery.Content(id); + return _publishedContentQuery.Content(id); } /// @@ -392,7 +392,7 @@ namespace Umbraco.Web /// The content, or null of the content item is not in the cache. public IPublishedContent Content(Guid id) { - return ContentQuery.Content(id); + return _publishedContentQuery.Content(id); } /// @@ -407,12 +407,12 @@ namespace Umbraco.Web public IPublishedContent Content(Udi id) { - return ContentQuery.Content(id); + return _publishedContentQuery.Content(id); } public IPublishedContent ContentSingleAtXPath(string xpath, params XPathVariable[] vars) { - return ContentQuery.ContentSingleAtXPath(xpath, vars); + return _publishedContentQuery.ContentSingleAtXPath(xpath, vars); } /// @@ -434,7 +434,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing content, it will be missing in the returned value. public IEnumerable Content(params Udi[] ids) { - return ids.Select(id => ContentQuery.Content(id)).WhereNotNull(); + return ids.Select(id => _publishedContentQuery.Content(id)).WhereNotNull(); } /// @@ -445,16 +445,16 @@ namespace Umbraco.Web /// If an identifier does not match an existing content, it will be missing in the returned value. public IEnumerable Content(params GuidUdi[] ids) { - return ids.Select(id => ContentQuery.Content(id)); + return ids.Select(id => _publishedContentQuery.Content(id)); } private IEnumerable ContentForObjects(IEnumerable ids) { var idsA = ids.ToArray(); if (ConvertIdsObjectToInts(idsA, out var intIds)) - return ContentQuery.Content(intIds); + return _publishedContentQuery.Content(intIds); if (ConvertIdsObjectToGuids(idsA, out var guidIds)) - return ContentQuery.Content(guidIds); + return _publishedContentQuery.Content(guidIds); return Enumerable.Empty(); } @@ -465,7 +465,7 @@ namespace Umbraco.Web /// The content items that were found in the cache. public IEnumerable Content(params int[] ids) { - return ContentQuery.Content(ids); + return _publishedContentQuery.Content(ids); } /// @@ -475,7 +475,7 @@ namespace Umbraco.Web /// The content items that were found in the cache. public IEnumerable Content(params Guid[] ids) { - return ContentQuery.Content(ids); + return _publishedContentQuery.Content(ids); } /// @@ -507,7 +507,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing content, it will be missing in the returned value. public IEnumerable Content(IEnumerable ids) { - return ids.Select(id => ContentQuery.Content(id)).WhereNotNull(); + return ids.Select(id => _publishedContentQuery.Content(id)).WhereNotNull(); } /// @@ -518,7 +518,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing content, it will be missing in the returned value. public IEnumerable Content(IEnumerable ids) { - return ids.Select(id => ContentQuery.Content(id)); + return ids.Select(id => _publishedContentQuery.Content(id)); } /// @@ -540,22 +540,22 @@ namespace Umbraco.Web /// If an identifier does not match an existing content, it will be missing in the returned value. public IEnumerable Content(IEnumerable ids) { - return ContentQuery.Content(ids); + return _publishedContentQuery.Content(ids); } public IEnumerable ContentAtXPath(string xpath, params XPathVariable[] vars) { - return ContentQuery.ContentAtXPath(xpath, vars); + return _publishedContentQuery.ContentAtXPath(xpath, vars); } public IEnumerable ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars) { - return ContentQuery.ContentAtXPath(xpath, vars); + return _publishedContentQuery.ContentAtXPath(xpath, vars); } public IEnumerable ContentAtRoot() { - return ContentQuery.ContentAtRoot(); + return _publishedContentQuery.ContentAtRoot(); } internal static bool ConvertIdObjectToInt(object id, out int intId) @@ -654,7 +654,7 @@ namespace Umbraco.Web public IPublishedContent Media(Guid id) { - return ContentQuery.Media(id); + return _publishedContentQuery.Media(id); } /// @@ -675,17 +675,17 @@ namespace Umbraco.Web private IPublishedContent MediaForObject(object id) { if (ConvertIdObjectToInt(id, out var intId)) - return ContentQuery.Media(intId); + return _publishedContentQuery.Media(intId); if (ConvertIdObjectToGuid(id, out var guidId)) - return ContentQuery.Media(guidId); + return _publishedContentQuery.Media(guidId); if (ConvertIdObjectToUdi(id, out var udiId)) - return ContentQuery.Media(udiId); + return _publishedContentQuery.Media(udiId); return null; } public IPublishedContent Media(int id) { - return ContentQuery.Media(id); + return _publishedContentQuery.Media(id); } public IPublishedContent Media(string id) @@ -708,9 +708,9 @@ namespace Umbraco.Web { var idsA = ids.ToArray(); if (ConvertIdsObjectToInts(idsA, out var intIds)) - return ContentQuery.Media(intIds); + return _publishedContentQuery.Media(intIds); if (ConvertIdsObjectToGuids(idsA, out var guidIds)) - return ContentQuery.Media(guidIds); + return _publishedContentQuery.Media(guidIds); return Enumerable.Empty(); } @@ -722,7 +722,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing media, it will be missing in the returned value. public IEnumerable Media(params int[] ids) { - return ContentQuery.Media(ids); + return _publishedContentQuery.Media(ids); } /// @@ -745,7 +745,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing media, it will be missing in the returned value. public IEnumerable Media(params Udi[] ids) { - return ids.Select(id => ContentQuery.Media(id)).WhereNotNull(); + return ids.Select(id => _publishedContentQuery.Media(id)).WhereNotNull(); } /// @@ -756,7 +756,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing media, it will be missing in the returned value. public IEnumerable Media(params GuidUdi[] ids) { - return ids.Select(id => ContentQuery.Media(id)); + return ids.Select(id => _publishedContentQuery.Media(id)); } /// @@ -778,7 +778,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing media, it will be missing in the returned value. public IEnumerable Media(IEnumerable ids) { - return ContentQuery.Media(ids); + return _publishedContentQuery.Media(ids); } /// @@ -789,7 +789,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing media, it will be missing in the returned value. public IEnumerable Media(IEnumerable ids) { - return ids.Select(id => ContentQuery.Media(id)).WhereNotNull(); + return ids.Select(id => _publishedContentQuery.Media(id)).WhereNotNull(); } /// @@ -800,7 +800,7 @@ namespace Umbraco.Web /// If an identifier does not match an existing media, it will be missing in the returned value. public IEnumerable Media(IEnumerable ids) { - return ids.Select(id => ContentQuery.Media(id)); + return ids.Select(id => _publishedContentQuery.Media(id)); } /// @@ -816,7 +816,7 @@ namespace Umbraco.Web public IEnumerable MediaAtRoot() { - return ContentQuery.MediaAtRoot(); + return _publishedContentQuery.MediaAtRoot(); } #endregion