diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec
index 8826705157..dc1224842e 100644
--- a/build/NuSpecs/UmbracoCms.Core.nuspec
+++ b/build/NuSpecs/UmbracoCms.Core.nuspec
@@ -35,6 +35,7 @@
+
diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec
index a188377c19..ad8ccb04e8 100644
--- a/build/NuSpecs/UmbracoCms.nuspec
+++ b/build/NuSpecs/UmbracoCms.nuspec
@@ -22,7 +22,7 @@
not want this to happen as the alpha of the next major is, really, the next major already.
-->
-
+
@@ -53,9 +53,8 @@
-
-
+
diff --git a/build/NuSpecs/tools/Dashboard.config.install.xdt b/build/NuSpecs/tools/Dashboard.config.install.xdt
deleted file mode 100644
index a81af8c365..0000000000
--- a/build/NuSpecs/tools/Dashboard.config.install.xdt
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
- views/dashboard/settings/settingsdashboardintro.html
-
-
-
-
-
-
- forms
-
-
-
- views/dashboard/forms/formsdashboardintro.html
-
-
-
-
-
-
- developer
-
-
-
-
-
-
- views/dashboard/developer/developerdashboardvideos.html
-
-
-
-
-
-
-
-
- views/dashboard/developer/examinemanagement.html
-
-
-
-
-
-
-
-
-
- views/dashboard/media/mediafolderbrowser.html
-
-
-
-
-
-
-
-
- views/dashboard/members/membersdashboardvideos.html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- content
-
-
-
- views/dashboard/developer/redirecturls.html
-
-
-
-
-
-
- developer
-
-
-
- views/dashboard/developer/healthcheck.html
-
-
-
-
diff --git a/build/build.ps1 b/build/build.ps1
index 65b4041e30..d811c2cc21 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -120,7 +120,7 @@
} finally {
Pop-Location
- # fixme - should we filter the log to find errors?
+ # FIXME: should we filter the log to find errors?
#get-content .\build.tmp\belle.log | %{ if ($_ -match "build") { write $_}}
# restore
@@ -177,7 +177,7 @@
{
Write-Host "Prepare Tests"
- # fixme - idea is to avoid rebuilding everything for tests
+ # FIXME: - idea is to avoid rebuilding everything for tests
# but because of our weird assembly versioning (with .* stuff)
# everything gets rebuilt all the time...
#Copy-Files "$tmp\bin" "." "$tmp\tests"
diff --git a/src/Umbraco.Core/Cache/CacheKeys.cs b/src/Umbraco.Core/Cache/CacheKeys.cs
index 50bd4ca0ac..e8f93d636a 100644
--- a/src/Umbraco.Core/Cache/CacheKeys.cs
+++ b/src/Umbraco.Core/Cache/CacheKeys.cs
@@ -7,7 +7,7 @@
{
public const string ApplicationsCacheKey = "ApplicationCache"; // used by SectionService
- // TODO this one can probably be removed
+ // 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/HttpRequestAppCache.cs b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs
index a255fea133..f1932f97ce 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/task: use IHttpContextAccessor NOT HttpContext.Current
+ /// TODO: https://github.com/umbraco/Umbraco-CMS/issues/4239 - use IHttpContextAccessor NOT HttpContext.Current
///
public HttpRequestAppCache()
{ }
diff --git a/src/Umbraco.Core/Components/CompositionExtensions.cs b/src/Umbraco.Core/Components/CompositionExtensions.cs
index 2aef865994..4e3e4816e5 100644
--- a/src/Umbraco.Core/Components/CompositionExtensions.cs
+++ b/src/Umbraco.Core/Components/CompositionExtensions.cs
@@ -10,6 +10,7 @@ using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Strings;
using Umbraco.Core.Sync;
using Umbraco.Core._Legacy.PackageActions;
+using Umbraco.Core.Logging.Viewer;
namespace Umbraco.Core.Components
{
@@ -297,6 +298,37 @@ namespace Umbraco.Core.Components
public static void SetMediaFileSystem(this Composition composition, Func filesystemFactory)
=> composition.RegisterUniqueFor(_ => filesystemFactory());
+ ///
+ /// Sets the log viewer.
+ ///
+ /// The type of the log viewer.
+ /// The composition.
+ public static void SetLogViewer(this Composition composition)
+ where T : ILogViewer
+ {
+ composition.RegisterUnique();
+ }
+
+ ///
+ /// Sets the log viewer.
+ ///
+ /// The composition.
+ /// A function creating a log viewer.
+ public static void SetLogViewer(this Composition composition, Func factory)
+ {
+ composition.RegisterUnique(factory);
+ }
+
+ ///
+ /// Sets the log viewer.
+ ///
+ /// A composition.
+ /// A log viewer.
+ public static void SetLogViewer(this Composition composition, ILogViewer viewer)
+ {
+ composition.RegisterUnique(_ => viewer);
+ }
+
#endregion
}
}
diff --git a/src/Umbraco.Core/Components/RelateOnCopyComponent.cs b/src/Umbraco.Core/Components/RelateOnCopyComponent.cs
index 404d385680..d38406f970 100644
--- a/src/Umbraco.Core/Components/RelateOnCopyComponent.cs
+++ b/src/Umbraco.Core/Components/RelateOnCopyComponent.cs
@@ -5,7 +5,7 @@ using Umbraco.Core.Services.Implement;
namespace Umbraco.Core.Components
{
- //TODO: This should just exist in the content service/repo!
+ // TODO: This should just exist in the content service/repo!
public sealed class RelateOnCopyComponent : IComponent
{
public void Initialize()
diff --git a/src/Umbraco.Core/Composing/Lifetime.cs b/src/Umbraco.Core/Composing/Lifetime.cs
index a35d4d9ecf..1a2cc3119a 100644
--- a/src/Umbraco.Core/Composing/Lifetime.cs
+++ b/src/Umbraco.Core/Composing/Lifetime.cs
@@ -15,7 +15,7 @@
///
/// One unique instance per request.
///
- // TODO - review lifetimes for LightInject vs other containers
+ // 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/TypeFinder.cs b/src/Umbraco.Core/Composing/TypeFinder.cs
index 4086eb394b..308d0ecfd7 100644
--- a/src/Umbraco.Core/Composing/TypeFinder.cs
+++ b/src/Umbraco.Core/Composing/TypeFinder.cs
@@ -614,7 +614,7 @@ namespace Umbraco.Core.Composing
var type = BuildManager.GetType(typeName, false);
if (type != null) return type;
- //TODO: This isn't very elegant, and will have issues since the AppDomain.CurrentDomain
+ // TODO: This isn't very elegant, and will have issues since the AppDomain.CurrentDomain
// doesn't actualy load in all assemblies, only the types that have been referenced so far.
// However, in a web context, the BuildManager will have executed which will force all assemblies
// to be loaded so it's fine for now.
diff --git a/src/Umbraco.Core/Composing/TypeHelper.cs b/src/Umbraco.Core/Composing/TypeHelper.cs
index c2746bef96..2f29ee09bc 100644
--- a/src/Umbraco.Core/Composing/TypeHelper.cs
+++ b/src/Umbraco.Core/Composing/TypeHelper.cs
@@ -278,7 +278,7 @@ namespace Umbraco.Core.Composing
#region Match Type
- //TODO: Need to determine if these methods should replace/combine/merge etc with IsTypeAssignableFrom, IsAssignableFromGeneric
+ // TODO: Need to determine if these methods should replace/combine/merge etc with IsTypeAssignableFrom, IsAssignableFromGeneric
// readings:
// http://stackoverflow.com/questions/2033912/c-sharp-variance-problem-assigning-listderived-as-listbase
diff --git a/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs b/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs
index f8ecc11d98..88eb61de76 100644
--- a/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs
+++ b/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs
@@ -114,7 +114,7 @@ namespace Umbraco.Core.Composing
return list;
}
- protected virtual int DefaultWeight { get; set; } = 10;
+ public virtual int DefaultWeight { get; set; } = 100;
protected virtual int GetWeight(Type type)
{
diff --git a/src/Umbraco.Core/ConfigsExtensions.cs b/src/Umbraco.Core/ConfigsExtensions.cs
index 0fcea5f430..6fdf7ea3b9 100644
--- a/src/Umbraco.Core/ConfigsExtensions.cs
+++ b/src/Umbraco.Core/ConfigsExtensions.cs
@@ -2,7 +2,6 @@
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
-using Umbraco.Core.Configuration.Dashboard;
using Umbraco.Core.Configuration.Grid;
using Umbraco.Core.Configuration.HealthChecks;
using Umbraco.Core.Configuration.UmbracoSettings;
@@ -22,9 +21,6 @@ namespace Umbraco.Core
public static IUmbracoSettingsSection Settings(this Configs configs)
=> configs.GetConfig();
- public static IDashboardSection Dashboards(this Configs configs)
- => configs.GetConfig();
-
public static IHealthChecks HealthChecks(this Configs configs)
=> configs.GetConfig();
@@ -40,7 +36,6 @@ namespace Umbraco.Core
configs.Add(() => new GlobalSettings());
configs.Add("umbracoConfiguration/settings");
- configs.Add("umbracoConfiguration/dashBoard");
configs.Add("umbracoConfiguration/HealthChecks");
configs.Add(() => new CoreDebug());
diff --git a/src/Umbraco.Core/Configuration/Dashboard/AccessElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AccessElement.cs
deleted file mode 100644
index 01538c8e0b..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/AccessElement.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Xml.Linq;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class AccessElement : RawXmlConfigurationElement, IAccess
- {
- public AccessElement()
- { }
-
- public AccessElement(XElement rawXml)
- : base(rawXml)
- { }
-
- public IEnumerable Rules
- {
- get
- {
- var result = new List();
- if (RawXml == null) return result;
-
- result.AddRange(RawXml.Elements("deny").Select(x => new AccessRule {Type = AccessRuleType.Deny, Value = x.Value }));
- result.AddRange(RawXml.Elements("grant").Select(x => new AccessRule { Type = AccessRuleType.Grant, Value = x.Value }));
- result.AddRange(RawXml.Elements("grantBySection").Select(x => new AccessRule { Type = AccessRuleType.GrantBySection, Value = x.Value }));
- return result;
- }
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs
deleted file mode 100644
index 31cc3eaec8..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Configuration;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class AreaCollection : ConfigurationElementCollection, IEnumerable
- {
- protected override ConfigurationElement CreateNewElement()
- {
- return new AreaElement();
- }
-
- protected override object GetElementKey(ConfigurationElement element)
- {
- return ((AreaElement) element).Value;
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- for (var i = 0; i < Count; i++)
- {
- yield return BaseGet(i) as IArea;
- }
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs
deleted file mode 100644
index 20393f89d8..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System.Configuration;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class AreaElement : InnerTextConfigurationElement, IArea
- {
- string IArea.AreaName
- {
- get { return Value; }
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs
deleted file mode 100644
index 92e51c9b73..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Configuration;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class AreasElement : ConfigurationElement
- {
- [ConfigurationCollection(typeof(SectionCollection), AddItemName = "area")]
- [ConfigurationProperty("", IsDefaultCollection = true)]
- public AreaCollection AreaCollection
- {
- get { return (AreaCollection)base[""]; }
- set { base[""] = value; }
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/ControlCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/ControlCollection.cs
deleted file mode 100644
index b8aa40da7f..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/ControlCollection.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Configuration;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class ControlCollection : ConfigurationElementCollection, IEnumerable
- {
- internal void Add(ControlElement c)
- {
- BaseAdd(c);
- }
-
- protected override ConfigurationElement CreateNewElement()
- {
- return new ControlElement();
- }
-
- protected override object GetElementKey(ConfigurationElement element)
- {
- return ((ControlElement)element).ControlPath;
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- for (var i = 0; i < Count; i++)
- {
- yield return BaseGet(i) as IDashboardControl;
- }
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/ControlElement.cs b/src/Umbraco.Core/Configuration/Dashboard/ControlElement.cs
deleted file mode 100644
index 20dac7460e..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/ControlElement.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System.Configuration;
-using System.Linq;
-using System.Xml.Linq;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
-
- internal class ControlElement : RawXmlConfigurationElement, IDashboardControl
- {
- public string PanelCaption
- {
- get
- {
- var panelCaption = RawXml.Attribute("panelCaption");
- return panelCaption == null ? "" : panelCaption.Value;
- }
- }
-
- public AccessElement Access
- {
- get
- {
- var access = RawXml.Element("access");
- return access == null ? new AccessElement() : new AccessElement(access);
- }
- }
-
- public string ControlPath
- {
- get
- {
- //we need to return the first (and only) text element of the children (wtf... who designed this configuration ! :P )
- var txt = RawXml.Nodes().OfType().FirstOrDefault();
- if (txt == null)
- {
- throw new ConfigurationErrorsException("The control element must contain a text node indicating the control path");
- }
- return txt.Value.Trim();
- }
- }
-
- IAccess IDashboardControl.AccessRights => Access;
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/DashboardSection.cs b/src/Umbraco.Core/Configuration/Dashboard/DashboardSection.cs
deleted file mode 100644
index 12bf0522e0..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/DashboardSection.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class DashboardSection : ConfigurationSection, IDashboardSection
- {
- [ConfigurationCollection(typeof(SectionCollection), AddItemName = "section")]
- [ConfigurationProperty("", IsDefaultCollection = true)]
- public SectionCollection SectionCollection
- {
- get { return (SectionCollection)base[""]; }
- set { base[""] = value; }
- }
-
- IEnumerable IDashboardSection.Sections
- {
- get { return SectionCollection; }
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/IAccess.cs b/src/Umbraco.Core/Configuration/Dashboard/IAccess.cs
deleted file mode 100644
index 8ac1b18cca..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/IAccess.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System.Collections.Generic;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- public interface IAccess
- {
- IEnumerable Rules { get; }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/IArea.cs b/src/Umbraco.Core/Configuration/Dashboard/IArea.cs
deleted file mode 100644
index 25401db408..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/IArea.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Umbraco.Core.Configuration.Dashboard
-{
- public interface IArea
- {
- string AreaName { get; }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/IDashboardControl.cs b/src/Umbraco.Core/Configuration/Dashboard/IDashboardControl.cs
deleted file mode 100644
index cdf05af1ec..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/IDashboardControl.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Umbraco.Core.Configuration.Dashboard
-{
- public interface IDashboardControl
- {
- string PanelCaption { get; }
-
- string ControlPath { get; }
-
- IAccess AccessRights { get; }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/IDashboardSection.cs b/src/Umbraco.Core/Configuration/Dashboard/IDashboardSection.cs
deleted file mode 100644
index 32dfc6653d..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/IDashboardSection.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System.Collections.Generic;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- public interface IDashboardSection
- {
- IEnumerable Sections { get; }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/IDashboardTab.cs b/src/Umbraco.Core/Configuration/Dashboard/IDashboardTab.cs
deleted file mode 100644
index 914b226265..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/IDashboardTab.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- public interface IDashboardTab
- {
- string Caption { get; }
-
- IEnumerable Controls { get; }
-
- IAccess AccessRights { get; }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/ISection.cs b/src/Umbraco.Core/Configuration/Dashboard/ISection.cs
deleted file mode 100644
index 1005c0750d..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/ISection.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- public interface ISection
- {
- string Alias { get; }
-
- IEnumerable Areas { get; }
-
- IEnumerable Tabs { get; }
-
- IAccess AccessRights { get; }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/SectionCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/SectionCollection.cs
deleted file mode 100644
index 5717bd28c3..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/SectionCollection.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Configuration;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class SectionCollection : ConfigurationElementCollection, IEnumerable
- {
- internal void Add(SectionElement c)
- {
- BaseAdd(c);
- }
-
- protected override ConfigurationElement CreateNewElement()
- {
- return new SectionElement();
- }
-
- protected override object GetElementKey(ConfigurationElement element)
- {
- return ((SectionElement)element).Alias;
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- for (var i = 0; i < Count; i++)
- {
- yield return BaseGet(i) as ISection;
- }
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs b/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs
deleted file mode 100644
index 09049c13db..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using System.Collections.Generic;
-using System.Configuration;
-using System.Linq;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class SectionElement : ConfigurationElement, ISection
- {
- [ConfigurationProperty("alias", IsRequired = true)]
- public string Alias
- {
- get { return (string) this["alias"]; }
- }
-
- [ConfigurationProperty("areas", IsRequired = true)]
- public AreasElement Areas
- {
- get { return (AreasElement)this["areas"]; }
- }
-
- [ConfigurationProperty("access")]
- public AccessElement Access
- {
- get { return (AccessElement)this["access"]; }
- }
-
- [ConfigurationCollection(typeof(SectionCollection), AddItemName = "tab")]
- [ConfigurationProperty("", IsDefaultCollection = true)]
- public TabCollection TabCollection
- {
- get { return (TabCollection)base[""]; }
- set { base[""] = value; }
- }
-
- IEnumerable ISection.Tabs
- {
- get { return TabCollection; }
- }
-
- IEnumerable ISection.Areas
- {
- get { return Areas.AreaCollection.Cast().Select(x => x.Value); }
- }
-
- IAccess ISection.AccessRights
- {
- get { return Access; }
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/TabCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/TabCollection.cs
deleted file mode 100644
index 1b77ffd3fb..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/TabCollection.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Configuration;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class TabCollection : ConfigurationElementCollection, IEnumerable
- {
- internal void Add(TabElement c)
- {
- BaseAdd(c);
- }
-
- protected override ConfigurationElement CreateNewElement()
- {
- return new TabElement();
- }
-
- protected override object GetElementKey(ConfigurationElement element)
- {
- return ((TabElement)element).Caption;
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- for (var i = 0; i < Count; i++)
- {
- yield return BaseGet(i) as IDashboardTab;
- }
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/TabElement.cs b/src/Umbraco.Core/Configuration/Dashboard/TabElement.cs
deleted file mode 100644
index b92394596e..0000000000
--- a/src/Umbraco.Core/Configuration/Dashboard/TabElement.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System.Collections.Generic;
-using System.Configuration;
-
-namespace Umbraco.Core.Configuration.Dashboard
-{
- internal class TabElement : ConfigurationElement, IDashboardTab
- {
- [ConfigurationProperty("caption", IsRequired = true)]
- public string Caption
- {
- get { return (string)this["caption"]; }
- }
-
- [ConfigurationProperty("access")]
- public AccessElement Access
- {
- get { return (AccessElement)this["access"]; }
- }
-
- [ConfigurationCollection(typeof(ControlCollection), AddItemName = "control")]
- [ConfigurationProperty("", IsDefaultCollection = true)]
- public ControlCollection ControlCollection
- {
- get { return (ControlCollection)base[""]; }
- set { base[""] = value; }
- }
-
- IEnumerable IDashboardTab.Controls
- {
- get { return ControlCollection; }
- }
-
- IAccess IDashboardTab.AccessRights
- {
- get { return Access; }
- }
- }
-}
diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs
index 2862a98a0e..0e7ef62c58 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()
{
- // TODO 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/UmbracoSettings/TourConfigElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/TourConfigElement.cs
index ebb649ca3b..fb231ec0cf 100644
--- a/src/Umbraco.Core/Configuration/UmbracoSettings/TourConfigElement.cs
+++ b/src/Umbraco.Core/Configuration/UmbracoSettings/TourConfigElement.cs
@@ -5,13 +5,13 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
internal class TourConfigElement : UmbracoConfigurationElement, ITourSection
{
//disabled by default so that upgraders don't get it enabled by default
- //TODO: we probably just want to disable the initial one from automatically loading ?
+ // TODO: we probably just want to disable the initial one from automatically loading ?
[ConfigurationProperty("enable", DefaultValue = false)]
public bool EnableTours
{
get { return (bool)this["enable"]; }
}
- //TODO: We could have additional filters, etc... defined here
+ // TODO: We could have additional filters, etc... defined here
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
index 7cb1a61cf1..7ab97500f0 100644
--- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs
+++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
@@ -31,7 +31,7 @@ namespace Umbraco.Core.Configuration
///
/// Gets the non-semantic version of the Umbraco code.
///
- // TODO rename to Version
+ // TODO: rename to Version
public static Version Current { get; }
///
@@ -81,7 +81,7 @@ namespace Umbraco.Core.Configuration
{
try
{
- // fixme/task - stop having version in web.config appSettings
+ // TODO: https://github.com/umbraco/Umbraco-CMS/issues/4238 - 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/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs
index 415357aab3..2d4042fad0 100644
--- a/src/Umbraco.Core/Constants-Applications.cs
+++ b/src/Umbraco.Core/Constants-Applications.cs
@@ -156,7 +156,7 @@
public const string ThirdParty = "thirdPartyGroup";
}
- //TODO: Fill in the rest!
+ // TODO: Fill in the rest!
}
}
}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/AccessRule.cs b/src/Umbraco.Core/Dashboards/AccessRule.cs
similarity index 72%
rename from src/Umbraco.Core/Configuration/Dashboard/AccessRule.cs
rename to src/Umbraco.Core/Dashboards/AccessRule.cs
index fe6840ff64..4f725e32f0 100644
--- a/src/Umbraco.Core/Configuration/Dashboard/AccessRule.cs
+++ b/src/Umbraco.Core/Dashboards/AccessRule.cs
@@ -1,9 +1,9 @@
-namespace Umbraco.Core.Configuration.Dashboard
+namespace Umbraco.Core.Dashboards
{
///
/// Implements .
///
- internal class AccessRule : IAccessRule
+ public class AccessRule : IAccessRule
{
///
public AccessRuleType Type { get; set; }
diff --git a/src/Umbraco.Core/Configuration/Dashboard/AccessRuleType.cs b/src/Umbraco.Core/Dashboards/AccessRuleType.cs
similarity index 93%
rename from src/Umbraco.Core/Configuration/Dashboard/AccessRuleType.cs
rename to src/Umbraco.Core/Dashboards/AccessRuleType.cs
index cb9ce983fe..efed361f6c 100644
--- a/src/Umbraco.Core/Configuration/Dashboard/AccessRuleType.cs
+++ b/src/Umbraco.Core/Dashboards/AccessRuleType.cs
@@ -1,4 +1,4 @@
-namespace Umbraco.Core.Configuration.Dashboard
+namespace Umbraco.Core.Dashboards
{
///
/// Defines dashboard access rules type.
diff --git a/src/Umbraco.Core/Dashboards/DashboardSlim.cs b/src/Umbraco.Core/Dashboards/DashboardSlim.cs
new file mode 100644
index 0000000000..a2869a90a2
--- /dev/null
+++ b/src/Umbraco.Core/Dashboards/DashboardSlim.cs
@@ -0,0 +1,12 @@
+using System.Runtime.Serialization;
+
+namespace Umbraco.Core.Dashboards
+{
+ [DataContract(IsReference = true)]
+ public class DashboardSlim : IDashboardSlim
+ {
+ public string Alias { get; set; }
+
+ public string View { get; set; }
+ }
+}
diff --git a/src/Umbraco.Core/Configuration/Dashboard/IAccessRule.cs b/src/Umbraco.Core/Dashboards/IAccessRule.cs
similarity index 80%
rename from src/Umbraco.Core/Configuration/Dashboard/IAccessRule.cs
rename to src/Umbraco.Core/Dashboards/IAccessRule.cs
index 8b51b1b73a..e3ac583379 100644
--- a/src/Umbraco.Core/Configuration/Dashboard/IAccessRule.cs
+++ b/src/Umbraco.Core/Dashboards/IAccessRule.cs
@@ -1,4 +1,7 @@
-namespace Umbraco.Core.Configuration.Dashboard
+using Newtonsoft.Json;
+using Umbraco.Core.Manifest;
+
+namespace Umbraco.Core.Dashboards
{
///
/// Represents an access rule.
diff --git a/src/Umbraco.Core/Dashboards/IDashboard.cs b/src/Umbraco.Core/Dashboards/IDashboard.cs
new file mode 100644
index 0000000000..eaf6c47c88
--- /dev/null
+++ b/src/Umbraco.Core/Dashboards/IDashboard.cs
@@ -0,0 +1,37 @@
+using System.Runtime.Serialization;
+
+namespace Umbraco.Core.Dashboards
+{
+ ///
+ /// Represents a dashboard.
+ ///
+ public interface IDashboard : IDashboardSlim
+ {
+ ///
+ /// Gets the aliases of sections/applications where this dashboard appears.
+ ///
+ ///
+ /// This field is *not* needed by the UI and therefore we want to exclude
+ /// it from serialization, but it is deserialized as part of the manifest,
+ /// therefore we cannot plainly ignore it.
+ /// So, it has to remain a data member, plus we use our special
+ /// JsonDontSerialize attribute (see attribute for more details).
+ ///
+ [DataMember(Name = "sections")]
+ string[] Sections { get; }
+
+
+ ///
+ /// Gets the access rule determining the visibility of the dashboard.
+ ///
+ ///
+ /// This field is *not* needed by the UI and therefore we want to exclude
+ /// it from serialization, but it is deserialized as part of the manifest,
+ /// therefore we cannot plainly ignore it.
+ /// So, it has to remain a data member, plus we use our special
+ /// JsonDontSerialize attribute (see attribute for more details).
+ ///
+ [DataMember(Name = "access")]
+ IAccessRule[] AccessRules { get; }
+ }
+}
diff --git a/src/Umbraco.Core/Dashboards/IDashboardSlim.cs b/src/Umbraco.Core/Dashboards/IDashboardSlim.cs
new file mode 100644
index 0000000000..655f56dfd9
--- /dev/null
+++ b/src/Umbraco.Core/Dashboards/IDashboardSlim.cs
@@ -0,0 +1,22 @@
+using System.Runtime.Serialization;
+
+namespace Umbraco.Core.Dashboards
+{
+ ///
+ /// Represents a dashboard with only minimal data.
+ ///
+ public interface IDashboardSlim
+ {
+ ///
+ /// Gets the alias of the dashboard.
+ ///
+ [DataMember(Name = "alias")]
+ string Alias { get; }
+
+ ///
+ /// Gets the view used to render the dashboard.
+ ///
+ [DataMember(Name = "view")]
+ string View { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs
new file mode 100644
index 0000000000..6c266ced2a
--- /dev/null
+++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs
@@ -0,0 +1,34 @@
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using Umbraco.Core.Models;
+
+namespace Umbraco.Core.Deploy
+{
+ ///
+ /// Defines methods that can convert data type configuration to / from an environment-agnostic string.
+ ///
+ /// Configuration may contain values such as content identifiers, that would be local
+ /// to one environment, and need to be converted in order to be deployed.
+ [SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "This is actual only used by Deploy, but we don't want third parties to have references on deploy, that's why this interface is part of core.")]
+ public interface IDataTypeConfigurationConnector
+ {
+ ///
+ /// Gets the property editor aliases that the value converter supports by default.
+ ///
+ IEnumerable PropertyEditorAliases { get; }
+
+ ///
+ /// Gets the artifact datatype configuration corresponding to the actual datatype configuration.
+ ///
+ /// The datatype.
+ /// The dependencies.
+ IDictionary ToArtifact(IDataType dataType, ICollection dependencies);
+
+ ///
+ /// Gets the actual datatype configuration corresponding to the artifact configuration.
+ ///
+ /// The datatype.
+ /// The artifact configuration.
+ object FromArtifact(IDataType dataType, IDictionary configuration);
+ }
+}
diff --git a/src/Umbraco.Core/Deploy/IPreValueConnector.cs b/src/Umbraco.Core/Deploy/IPreValueConnector.cs
deleted file mode 100644
index 2a8f4e622d..0000000000
--- a/src/Umbraco.Core/Deploy/IPreValueConnector.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Collections.Generic;
-
-namespace Umbraco.Core.Deploy
-{
- ///
- /// Defines methods that can convert a preValue to / from an environment-agnostic string.
- ///
- /// 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/task: rename to IDataTypeConfigurationConnector + kill all "preValues" name usage
- {
- ///
- /// Gets the property editor aliases that the value converter supports by default.
- ///
- IEnumerable PropertyEditorAliases { get; }
-
- ///
- /// Gets the environment-agnostic preValues corresponding to environment-specific preValues.
- ///
- /// The environment-specific preValues.
- /// The dependencies.
- ///
- IDictionary ConvertToDeploy(IDictionary preValues, ICollection dependencies);
-
- ///
- /// Gets the environment-specific preValues corresponding to environment-agnostic preValues.
- ///
- /// The environment-agnostic preValues.
- ///
- IDictionary ConvertToLocalEnvironment(IDictionary preValues);
- }
-}
diff --git a/src/Umbraco.Core/EmailSender.cs b/src/Umbraco.Core/EmailSender.cs
index 1f2c6d8653..0fda5c40a4 100644
--- a/src/Umbraco.Core/EmailSender.cs
+++ b/src/Umbraco.Core/EmailSender.cs
@@ -17,7 +17,7 @@ namespace Umbraco.Core
///
public class EmailSender : IEmailSender
{
- //TODO: This should encapsulate a BackgroundTaskRunner with a queue to send these emails!
+ // TODO: This should encapsulate a BackgroundTaskRunner with a queue to send these emails!
private readonly bool _enableEvents;
diff --git a/src/Umbraco.Core/Events/ImportPackageEventArgs.cs b/src/Umbraco.Core/Events/ImportPackageEventArgs.cs
index 61369af59d..a044cd71b3 100644
--- a/src/Umbraco.Core/Events/ImportPackageEventArgs.cs
+++ b/src/Umbraco.Core/Events/ImportPackageEventArgs.cs
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Events
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
- //TODO: MetaData for package metadata has no equality operators :/
+ // TODO: MetaData for package metadata has no equality operators :/
return base.Equals(other) && PackageMetaData.Equals(other.PackageMetaData);
}
diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs
index 164b452f2c..88b527e753 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;
- // todo: inject
+ // TODO: inject
private IMediaFileSystem MediaFileSystem => _mediaFileSystem ?? (_mediaFileSystem = Current.MediaFileSystem);
}
}
diff --git a/src/Umbraco.Core/IO/FileSystemExtensions.cs b/src/Umbraco.Core/IO/FileSystemExtensions.cs
index ade2c58b38..e0f5af75c5 100644
--- a/src/Umbraco.Core/IO/FileSystemExtensions.cs
+++ b/src/Umbraco.Core/IO/FileSystemExtensions.cs
@@ -54,7 +54,7 @@ namespace Umbraco.Core.IO
return Path.GetFileName(fs.GetFullPath(path));
}
- //TODO: Currently this is the only way to do this
+ // TODO: Currently this is the only way to do this
internal static void CreateFolder(this IFileSystem fs, string folderPath)
{
var path = fs.GetRelativePath(folderPath);
diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs
index 38cb7df824..19d29e14ba 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);
- // todo - do we need a lock here?
+ // TODO: do we need a lock here?
_shadowWrappers.Add(_macroPartialFileSystem);
_shadowWrappers.Add(_partialViewsFileSystem);
_shadowWrappers.Add(_stylesheetsFileSystem);
diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs
index 76e7631482..a92b556240 100644
--- a/src/Umbraco.Core/IO/IOHelper.cs
+++ b/src/Umbraco.Core/IO/IOHelper.cs
@@ -155,8 +155,7 @@ namespace Umbraco.Core.IO
//
// except that for templates, filePath actually is a virtual path
- //TODO
- // what's below is dirty, there are too many ways to get the root dir, etc.
+ // TODO: what's below is dirty, there are too many ways to get the root dir, etc.
// not going to fix everything today
var mappedRoot = MapPath(SystemDirectories.Root);
diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs
index 80f4c57ee3..66ef095b04 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) // todo - what if we cannot?
+ if (stream.CanSeek) // TODO: what if we cannot?
stream.Seek(0, 0);
using (var destination = (Stream) File.Create(fullPath))
@@ -284,7 +284,7 @@ namespace Umbraco.Core.IO
var opath = path;
path = EnsureDirectorySeparatorChar(path);
- // fixme - this part should go!
+ // FIXME: this part should go!
// not sure what we are doing here - so if input starts with a (back) slash,
// we assume it's not a FS relative path and we try to convert it... but it
// really makes little sense?
diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs b/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs
index f3d1b5137f..5ddcb01078 100644
--- a/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs
+++ b/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Core.Logging.Viewer
{
public void Compose(Composition composition)
{
- composition.RegisterUnique(_ => new JsonLogViewer());
+ composition.SetLogViewer(_ => new JsonLogViewer());
}
}
}
diff --git a/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs b/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs
index c627728a32..67c5a5824e 100644
--- a/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs
+++ b/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs
@@ -1,7 +1,7 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using Umbraco.Core.Configuration.Dashboard;
+using Umbraco.Core.Dashboards;
using Umbraco.Core.Serialization;
namespace Umbraco.Core.Manifest
diff --git a/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs b/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs
index 0667f11aab..af66bfc544 100644
--- a/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs
+++ b/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs
@@ -1,12 +1,6 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Runtime.Serialization;
-using System.Text.RegularExpressions;
using Umbraco.Core.IO;
-using Umbraco.Core.Models;
-using Umbraco.Core.Models.ContentEditing;
-using Umbraco.Core.Models.Membership;
namespace Umbraco.Core.Manifest
{
@@ -30,6 +24,7 @@ namespace Umbraco.Core.Manifest
///
/// Represents a content app definition, parsed from a manifest.
///
+ /// Is used to create an actual .
[DataContract(Name = "appdef", Namespace = "")]
public class ManifestContentAppDefinition
{
diff --git a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs b/src/Umbraco.Core/Manifest/ManifestDashboard.cs
similarity index 79%
rename from src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs
rename to src/Umbraco.Core/Manifest/ManifestDashboard.cs
index 83f047b264..e790655221 100644
--- a/src/Umbraco.Core/Manifest/ManifestDashboardDefinition.cs
+++ b/src/Umbraco.Core/Manifest/ManifestDashboard.cs
@@ -1,23 +1,20 @@
using System;
using System.ComponentModel;
using Newtonsoft.Json;
-using Umbraco.Core.Configuration.Dashboard;
+using Umbraco.Core.Dashboards;
using Umbraco.Core.IO;
namespace Umbraco.Core.Manifest
{
- public class ManifestDashboardDefinition
+ public class ManifestDashboard : IDashboard
{
private string _view;
- [JsonProperty("name", Required = Required.Always)]
- public string Name { get; set; }
-
[JsonProperty("alias", Required = Required.Always)]
public string Alias { get; set; }
[JsonProperty("weight", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
- [DefaultValue(100)]
+ [DefaultValue(100)] // must be equal to DashboardCollectionBuilder.DefaultWeight
public int Weight { get; set; }
[JsonProperty("view", Required = Required.Always)]
diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Core/Manifest/ManifestParser.cs
index 01bc0b1983..6ca3b916ea 100644
--- a/src/Umbraco.Core/Manifest/ManifestParser.cs
+++ b/src/Umbraco.Core/Manifest/ManifestParser.cs
@@ -1,184 +1,182 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using Newtonsoft.Json;
-using Umbraco.Core.Cache;
-using Umbraco.Core.Exceptions;
-using Umbraco.Core.IO;
-using Umbraco.Core.Logging;
-using Umbraco.Core.Models.ContentEditing;
-using Umbraco.Core.Models.Trees;
-using Umbraco.Core.PropertyEditors;
-
-namespace Umbraco.Core.Manifest
-{
- ///
- /// Parses the Main.js file and replaces all tokens accordingly.
- ///
- public class ManifestParser
- {
- private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble());
-
- private readonly IAppPolicyCache _cache;
- private readonly ILogger _logger;
- private readonly ManifestValueValidatorCollection _validators;
-
- private string _path;
-
- ///
- /// Initializes a new instance of the class.
- ///
- public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger)
- : this(appCaches, validators, "~/App_Plugins", logger)
- { }
-
- ///
- /// Initializes a new instance of the class.
- ///
- private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger)
- {
- if (appCaches == null) throw new ArgumentNullException(nameof(appCaches));
- _cache = appCaches.RuntimeCache;
- _validators = validators ?? throw new ArgumentNullException(nameof(validators));
- if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path));
- Path = path;
- _logger = logger ?? throw new ArgumentNullException(nameof(logger));
- }
-
- public string Path
- {
- get => _path;
- set => _path = value.StartsWith("~/") ? IOHelper.MapPath(value) : value;
- }
-
- ///
- /// Gets all manifests, merged into a single manifest object.
- ///
- ///
- public PackageManifest Manifest
- => _cache.GetCacheItem("Umbraco.Core.Manifest.ManifestParser::Manifests", () =>
- {
- var manifests = GetManifests();
- return MergeManifests(manifests);
- }, new TimeSpan(0, 4, 0));
-
- ///
- /// Gets all manifests.
- ///
- private IEnumerable GetManifests()
- {
- var manifests = new List();
-
- foreach (var path in GetManifestFiles())
- {
- try
- {
- var text = File.ReadAllText(path);
- text = TrimPreamble(text);
- if (string.IsNullOrWhiteSpace(text))
- continue;
- var manifest = ParseManifest(text);
- manifests.Add(manifest);
- }
- catch (Exception e)
- {
- _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path);
- }
- }
-
- return manifests;
- }
-
- ///
- /// Merges all manifests into one.
- ///
- private static PackageManifest MergeManifests(IEnumerable manifests)
- {
- var scripts = new HashSet();
- var stylesheets = new HashSet();
- var propertyEditors = new List();
- var parameterEditors = new List();
- var gridEditors = new List();
- var contentApps = new List();
- var dashboards = new List();
- var sections = new List();
-
- foreach (var manifest in manifests)
- {
- if (manifest.Scripts != null) foreach (var script in manifest.Scripts) scripts.Add(script);
- if (manifest.Stylesheets != null) foreach (var stylesheet in manifest.Stylesheets) stylesheets.Add(stylesheet);
- if (manifest.PropertyEditors != null) propertyEditors.AddRange(manifest.PropertyEditors);
- if (manifest.ParameterEditors != null) parameterEditors.AddRange(manifest.ParameterEditors);
- if (manifest.GridEditors != null) gridEditors.AddRange(manifest.GridEditors);
- if (manifest.ContentApps != null) contentApps.AddRange(manifest.ContentApps);
- if (manifest.Dashboards != null) dashboards.AddRange(manifest.Dashboards);
- if (manifest.Sections != null) sections.AddRange(manifest.Sections.DistinctBy(x => x.Alias.ToLowerInvariant()));
- }
-
- return new PackageManifest
- {
- Scripts = scripts.ToArray(),
- Stylesheets = stylesheets.ToArray(),
- PropertyEditors = propertyEditors.ToArray(),
- ParameterEditors = parameterEditors.ToArray(),
- GridEditors = gridEditors.ToArray(),
- ContentApps = contentApps.ToArray(),
- Dashboards = dashboards.ToArray(),
- Sections = sections.ToArray()
- };
- }
-
- // gets all manifest files (recursively)
- private IEnumerable GetManifestFiles()
- {
- if (Directory.Exists(_path) == false)
- return new string[0];
- return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories);
- }
-
- private static string TrimPreamble(string text)
- {
- // strangely StartsWith(preamble) would always return true
- if (text.Substring(0, 1) == Utf8Preamble)
- text = text.Remove(0, Utf8Preamble.Length);
-
- return text;
- }
-
- ///
- /// Parses a manifest.
- ///
- internal PackageManifest ParseManifest(string text)
- {
- if (string.IsNullOrWhiteSpace(text))
- throw new ArgumentNullOrEmptyException(nameof(text));
-
- var manifest = JsonConvert.DeserializeObject(text,
- new DataEditorConverter(_logger),
- new ValueValidatorConverter(_validators),
- new DashboardAccessRuleConverter());
-
- // scripts and stylesheets are raw string, must process here
- for (var i = 0; i < manifest.Scripts.Length; i++)
- manifest.Scripts[i] = IOHelper.ResolveVirtualUrl(manifest.Scripts[i]);
- for (var i = 0; i < manifest.Stylesheets.Length; i++)
- manifest.Stylesheets[i] = IOHelper.ResolveVirtualUrl(manifest.Stylesheets[i]);
-
- // add property editors that are also parameter editors, to the parameter editors list
- // (the manifest format is kinda legacy)
- var ppEditors = manifest.PropertyEditors.Where(x => (x.Type & EditorType.MacroParameter) > 0).ToList();
- if (ppEditors.Count > 0)
- manifest.ParameterEditors = manifest.ParameterEditors.Union(ppEditors).ToArray();
-
- return manifest;
- }
-
- // purely for tests
- internal IEnumerable ParseGridEditors(string text)
- {
- return JsonConvert.DeserializeObject>(text);
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using Newtonsoft.Json;
+using Umbraco.Core.Cache;
+using Umbraco.Core.Exceptions;
+using Umbraco.Core.IO;
+using Umbraco.Core.Logging;
+using Umbraco.Core.PropertyEditors;
+
+namespace Umbraco.Core.Manifest
+{
+ ///
+ /// Parses the Main.js file and replaces all tokens accordingly.
+ ///
+ public class ManifestParser
+ {
+ private static readonly string Utf8Preamble = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble());
+
+ private readonly IAppPolicyCache _cache;
+ private readonly ILogger _logger;
+ private readonly ManifestValueValidatorCollection _validators;
+
+ private string _path;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, ILogger logger)
+ : this(appCaches, validators, "~/App_Plugins", logger)
+ { }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private ManifestParser(AppCaches appCaches, ManifestValueValidatorCollection validators, string path, ILogger logger)
+ {
+ if (appCaches == null) throw new ArgumentNullException(nameof(appCaches));
+ _cache = appCaches.RuntimeCache;
+ _validators = validators ?? throw new ArgumentNullException(nameof(validators));
+ if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullOrEmptyException(nameof(path));
+ Path = path;
+ _logger = logger ?? throw new ArgumentNullException(nameof(logger));
+ }
+
+ public string Path
+ {
+ get => _path;
+ set => _path = value.StartsWith("~/") ? IOHelper.MapPath(value) : value;
+ }
+
+ ///
+ /// Gets all manifests, merged into a single manifest object.
+ ///
+ ///
+ public PackageManifest Manifest
+ => _cache.GetCacheItem("Umbraco.Core.Manifest.ManifestParser::Manifests", () =>
+ {
+ var manifests = GetManifests();
+ return MergeManifests(manifests);
+ }, new TimeSpan(0, 4, 0));
+
+ ///
+ /// Gets all manifests.
+ ///
+ private IEnumerable GetManifests()
+ {
+ var manifests = new List();
+
+ foreach (var path in GetManifestFiles())
+ {
+ try
+ {
+ var text = File.ReadAllText(path);
+ text = TrimPreamble(text);
+ if (string.IsNullOrWhiteSpace(text))
+ continue;
+ var manifest = ParseManifest(text);
+ manifests.Add(manifest);
+ }
+ catch (Exception e)
+ {
+ _logger.Error(e, "Failed to parse manifest at '{Path}', ignoring.", path);
+ }
+ }
+
+ return manifests;
+ }
+
+ ///
+ /// Merges all manifests into one.
+ ///
+ private static PackageManifest MergeManifests(IEnumerable manifests)
+ {
+ var scripts = new HashSet();
+ var stylesheets = new HashSet();
+ var propertyEditors = new List();
+ var parameterEditors = new List();
+ var gridEditors = new List();
+ var contentApps = new List();
+ var dashboards = new List();
+ var sections = new List();
+
+ foreach (var manifest in manifests)
+ {
+ if (manifest.Scripts != null) foreach (var script in manifest.Scripts) scripts.Add(script);
+ if (manifest.Stylesheets != null) foreach (var stylesheet in manifest.Stylesheets) stylesheets.Add(stylesheet);
+ if (manifest.PropertyEditors != null) propertyEditors.AddRange(manifest.PropertyEditors);
+ if (manifest.ParameterEditors != null) parameterEditors.AddRange(manifest.ParameterEditors);
+ if (manifest.GridEditors != null) gridEditors.AddRange(manifest.GridEditors);
+ if (manifest.ContentApps != null) contentApps.AddRange(manifest.ContentApps);
+ if (manifest.Dashboards != null) dashboards.AddRange(manifest.Dashboards);
+ if (manifest.Sections != null) sections.AddRange(manifest.Sections.DistinctBy(x => x.Alias.ToLowerInvariant()));
+ }
+
+ return new PackageManifest
+ {
+ Scripts = scripts.ToArray(),
+ Stylesheets = stylesheets.ToArray(),
+ PropertyEditors = propertyEditors.ToArray(),
+ ParameterEditors = parameterEditors.ToArray(),
+ GridEditors = gridEditors.ToArray(),
+ ContentApps = contentApps.ToArray(),
+ Dashboards = dashboards.ToArray(),
+ Sections = sections.ToArray()
+ };
+ }
+
+ // gets all manifest files (recursively)
+ private IEnumerable GetManifestFiles()
+ {
+ if (Directory.Exists(_path) == false)
+ return new string[0];
+ return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories);
+ }
+
+ private static string TrimPreamble(string text)
+ {
+ // strangely StartsWith(preamble) would always return true
+ if (text.Substring(0, 1) == Utf8Preamble)
+ text = text.Remove(0, Utf8Preamble.Length);
+
+ return text;
+ }
+
+ ///
+ /// Parses a manifest.
+ ///
+ internal PackageManifest ParseManifest(string text)
+ {
+ if (string.IsNullOrWhiteSpace(text))
+ throw new ArgumentNullOrEmptyException(nameof(text));
+
+ var manifest = JsonConvert.DeserializeObject(text,
+ new DataEditorConverter(_logger),
+ new ValueValidatorConverter(_validators),
+ new DashboardAccessRuleConverter());
+
+ // scripts and stylesheets are raw string, must process here
+ for (var i = 0; i < manifest.Scripts.Length; i++)
+ manifest.Scripts[i] = IOHelper.ResolveVirtualUrl(manifest.Scripts[i]);
+ for (var i = 0; i < manifest.Stylesheets.Length; i++)
+ manifest.Stylesheets[i] = IOHelper.ResolveVirtualUrl(manifest.Stylesheets[i]);
+
+ // add property editors that are also parameter editors, to the parameter editors list
+ // (the manifest format is kinda legacy)
+ var ppEditors = manifest.PropertyEditors.Where(x => (x.Type & EditorType.MacroParameter) > 0).ToList();
+ if (ppEditors.Count > 0)
+ manifest.ParameterEditors = manifest.ParameterEditors.Union(ppEditors).ToArray();
+
+ return manifest;
+ }
+
+ // purely for tests
+ internal IEnumerable ParseGridEditors(string text)
+ {
+ return JsonConvert.DeserializeObject>(text);
+ }
+ }
+}
diff --git a/src/Umbraco.Core/Manifest/PackageManifest.cs b/src/Umbraco.Core/Manifest/PackageManifest.cs
index b29a28ab06..c272449509 100644
--- a/src/Umbraco.Core/Manifest/PackageManifest.cs
+++ b/src/Umbraco.Core/Manifest/PackageManifest.cs
@@ -49,7 +49,7 @@ namespace Umbraco.Core.Manifest
/// Gets or sets the dashboards listed in the manifest.
///
[JsonProperty("dashboards")]
- public ManifestDashboardDefinition[] Dashboards { get; set; } = Array.Empty();
+ public ManifestDashboard[] Dashboards { get; set; } = Array.Empty();
///
/// Gets or sets the sections listed in the manifest.
diff --git a/src/Umbraco.Core/Media/Result.cs b/src/Umbraco.Core/Media/Result.cs
index 82894a5ef5..a8683d03d5 100644
--- a/src/Umbraco.Core/Media/Result.cs
+++ b/src/Umbraco.Core/Media/Result.cs
@@ -1,7 +1,7 @@
namespace Umbraco.Core.Media
{
- //TODO: Could definitely have done with a better name
+ // TODO: Could definitely have done with a better name
public class Result
{
public Status Status { get; set; }
diff --git a/src/Umbraco.Core/Migrations/IMigrationExpression.cs b/src/Umbraco.Core/Migrations/IMigrationExpression.cs
index 81063bd2da..c60126f63c 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); // todo: remove that one?
+ string Process(IMigrationContext context); // TODO: remove that one?
void Execute();
}
}
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
index 4104ce947c..9c6ff208f8 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
+++ b/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
@@ -283,48 +283,60 @@ namespace Umbraco.Core.Migrations.Install
if (string.IsNullOrWhiteSpace(connectionString)) throw new ArgumentNullOrEmptyException(nameof(connectionString));
if (string.IsNullOrWhiteSpace(providerName)) throw new ArgumentNullOrEmptyException(nameof(providerName));
- // set the connection string for the new datalayer
- var connectionStringSettings = new ConnectionStringSettings(Constants.System.UmbracoConnectionName, connectionString, providerName);
+ var fileSource = "web.config";
+ var fileName = IOHelper.MapPath(SystemDirectories.Root +"/" + fileSource);
- var fileName = IOHelper.MapPath($"{SystemDirectories.Root}/web.config");
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
- if (xml.Root == null) throw new Exception("Invalid web.config file.");
- var connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault();
- if (connectionStrings == null) throw new Exception("Invalid web.config file.");
+ if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root).");
- // honour configSource, if its set, change the xml file we are saving the configuration
- // to the one set in the configSource attribute
- if (connectionStrings.Attribute("configSource") != null)
+ var connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault();
+ if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings).");
+
+ // handle configSource
+ var configSourceAttribute = connectionStrings.Attribute("configSource");
+ if (configSourceAttribute != null)
{
- var source = connectionStrings.Attribute("configSource").Value;
- var configFile = IOHelper.MapPath($"{SystemDirectories.Root}/{source}");
- logger.Info("Storing ConnectionString in {ConfigFile}", configFile);
- if (File.Exists(configFile))
- {
- xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
- fileName = configFile;
- }
+ fileSource = configSourceAttribute.Value;
+ fileName = IOHelper.MapPath(SystemDirectories.Root + "/" + fileSource);
+
+ if (!File.Exists(fileName))
+ throw new Exception($"Invalid configSource \"{fileSource}\" (no such file).");
+
+ xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
+ if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root).");
+
connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault();
- if (connectionStrings == null) throw new Exception("Invalid web.config file.");
+ if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings).");
}
- // update connectionString if it exists, or else create a new connectionString
- var setting = connectionStrings.Descendants("add").FirstOrDefault(s => s.Attribute("name").Value == Constants.System.UmbracoConnectionName);
+ // create or update connection string
+ var setting = connectionStrings.Descendants("add").FirstOrDefault(s => s.Attribute("name")?.Value == Constants.System.UmbracoConnectionName);
if (setting == null)
{
connectionStrings.Add(new XElement("add",
new XAttribute("name", Constants.System.UmbracoConnectionName),
- new XAttribute("connectionString", connectionStringSettings),
+ new XAttribute("connectionString", connectionString),
new XAttribute("providerName", providerName)));
}
else
{
- setting.Attribute("connectionString").Value = connectionString;
- setting.Attribute("providerName").Value = providerName;
+ AddOrUpdateAttribute(setting, "connectionString", connectionString);
+ AddOrUpdateAttribute(setting, "providerName", providerName);
}
+ // save
+ logger.Info("Saving connection string to {ConfigFile}.", fileSource);
xml.Save(fileName, SaveOptions.DisableFormatting);
- logger.Info("Configured a new ConnectionString using the '{ProviderName}' provider.", providerName);
+ logger.Info("Saved connection string to {ConfigFile}.", fileSource);
+ }
+
+ private static void AddOrUpdateAttribute(XElement element, string name, string value)
+ {
+ var attribute = element.Attribute(name);
+ if (attribute == null)
+ element.Add(new XAttribute(name, value));
+ else
+ attribute.Value = value;
}
internal bool IsConnectionStringConfigured(ConnectionStringSettings databaseSettings)
@@ -422,7 +434,7 @@ namespace Umbraco.Core.Migrations.Install
_logger.Info("Database configuration status: Started");
var database = scope.Database;
-
+
var message = string.Empty;
var schemaResult = ValidateSchema();
@@ -482,7 +494,7 @@ namespace Umbraco.Core.Migrations.Install
}
_logger.Info("Database upgrade started");
-
+
// upgrade
var upgrader = new UmbracoUpgrader();
upgrader.Execute(_scopeProvider, _migrationBuilder, _keyValueService, _logger, _postMigrations);
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
index 4e0b5dfa0f..7e9df321c3 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
+++ b/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
@@ -263,7 +263,7 @@ namespace Umbraco.Core.Migrations.Install
const string listLayout = "{\"name\": \"List\",\"path\": \"views/propertyeditors/listview/layouts/list/list.html\",\"icon\": \"icon-list\", \"isSystem\": 1,\"selected\": true}";
const string layouts = "[" + cardLayout + "," + listLayout + "]";
- //TODO Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
+ // TODO: Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -49, EditorAlias = Constants.PropertyEditors.Aliases.Boolean, DbType = "Integer" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -51, EditorAlias = Constants.PropertyEditors.Aliases.Integer, DbType = "Integer" });
_database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -87, EditorAlias = Constants.PropertyEditors.Aliases.TinyMce, DbType = "Ntext",
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs
index d3f6937834..f21216fde3 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs
+++ b/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Migrations.Install
public List TableDefinitions { get; }
- // todo what are these exactly? 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/UmbracoPlan.cs b/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
index 833955ee6a..f4732acc4b 100644
--- a/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
+++ b/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
@@ -124,6 +124,7 @@ namespace Umbraco.Core.Migrations.Upgrade
To("{64EBCE53-E1F0-463A-B40B-E98EFCCA8AE2}");
To("{0009109C-A0B8-4F3F-8FEB-C137BBDDA268}");
To("{8A027815-D5CD-4872-8B88-9A51AB5986A6}"); // from 7.14.0
+ To("{ED28B66A-E248-4D94-8CDB-9BDF574023F0}");
//FINAL
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
new file mode 100644
index 0000000000..7e7f398791
--- /dev/null
+++ b/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Umbraco.Core.Logging;
+using Umbraco.Core.Models.PublishedContent;
+using Umbraco.Core.Persistence;
+using Umbraco.Core.Persistence.Dtos;
+
+namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
+{
+ public class ConvertRelatedLinksToMultiUrlPicker : MigrationBase
+ {
+ public ConvertRelatedLinksToMultiUrlPicker(IMigrationContext context) : base(context)
+ { }
+
+ public override void Migrate()
+ {
+ var sqlDataTypes = Sql()
+ .Select()
+ .From()
+ .Where(x => x.EditorAlias == "Umbraco.RelatedLinks"
+ || x.EditorAlias == "Umbraco.RelatedLinks2");
+
+ var dataTypes = Database.Fetch(sqlDataTypes);
+ var dataTypeIds = dataTypes.Select(x => x.NodeId).ToList();
+
+ var sqlPropertyTpes = Sql()
+ .Select()
+ .From()
+ .Where(x => dataTypeIds.Contains(x.DataTypeId));
+
+ var propertyTypeIds = Database.Fetch(sqlPropertyTpes).Select(x => x.Id);
+
+ var sqlPropertyData = Sql()
+ .Select()
+ .From()
+ .Where(x => propertyTypeIds.Contains(x.PropertyTypeId));
+
+ var properties = Database.Fetch(sqlPropertyData);
+
+ // Create a Multi URL Picker datatype for the converted RelatedLinks data
+ if (properties.Any() == false)
+ return;
+
+ foreach (var property in properties)
+ {
+ var value = property.Value.ToString();
+ if (string.IsNullOrWhiteSpace(value))
+ continue;
+
+ var relatedLinks = JsonConvert.DeserializeObject>(value);
+ var links = new List();
+ foreach (var relatedLink in relatedLinks)
+ {
+ GuidUdi udi = null;
+ if (relatedLink.IsInternal)
+ {
+ var linkIsUdi = GuidUdi.TryParse(relatedLink.Link, out udi);
+ if (linkIsUdi == false)
+ {
+ // oh no.. probably an integer, yikes!
+ if (int.TryParse(relatedLink.Link, out var intId))
+ {
+ var sqlNodeData = Sql()
+ .Select()
+ .Where(x => x.NodeId == intId);
+
+ var node = Database.Fetch(sqlNodeData).FirstOrDefault();
+ if (node != null)
+ // Note: RelatedLinks did not allow for picking media items,
+ // so if there's a value this will be a content item - hence
+ // the hardcoded "document" here
+ udi = new GuidUdi("document", node.UniqueId);
+ }
+ }
+ }
+
+ var link = new LinkDto
+ {
+ Name = relatedLink.Caption,
+ Target = relatedLink.NewWindow ? "_blank" : null,
+ Udi = udi,
+ // Should only have a URL if it's an external link otherwise it wil be a UDI
+ Url = relatedLink.IsInternal == false ? relatedLink.Link : null
+ };
+
+ links.Add(link);
+ }
+
+ var json = JsonConvert.SerializeObject(links);
+
+ // Update existing data
+ property.TextValue = json;
+ Database.Update(property);
+ }
+
+ foreach (var dataType in dataTypes)
+ {
+ // Change existing datatypes from RelatedLinks to MultiUrlPicker
+ var dataTypeResult = Database.Fetch(Sql()
+ .Select()
+ .From()
+ .Where(x => x.NodeId == dataType.NodeId)).First();
+
+ dataTypeResult.EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker;
+ Database.Update(dataTypeResult);
+ }
+ }
+ }
+
+ internal class RelatedLink
+ {
+ public int? Id { get; internal set; }
+ internal bool IsDeleted { get; set; }
+ [JsonProperty("caption")]
+ public string Caption { get; set; }
+ [JsonProperty("link")]
+ public string Link { get; set; }
+ [JsonProperty("newWindow")]
+ public bool NewWindow { get; set; }
+ [JsonProperty("isInternal")]
+ public bool IsInternal { get; set; }
+ }
+
+ [DataContract]
+ internal class LinkDto
+ {
+ [DataMember(Name = "name")]
+ public string Name { get; set; }
+
+ [DataMember(Name = "target")]
+ public string Target { get; set; }
+
+ [DataMember(Name = "udi")]
+ public GuidUdi Udi { get; set; }
+
+ [DataMember(Name = "url")]
+ public string Url { get; set; }
+ }
+}
diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs
index 0d4e9ce789..ca1152a9a4 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.
- /// todo - remove this proxy method
+ /// TODO: remove this proxy method
///
[IgnoreDataMember]
public IEnumerable PropertyGroups => ContentTypeBase.CompositionPropertyGroups;
///
/// Gets the numeration of property types for the entity.
- /// todo - remove this proxy method
+ /// TODO: remove this proxy method
///
[IgnoreDataMember]
public IEnumerable PropertyTypes => ContentTypeBase.CompositionPropertyTypes;
diff --git a/src/Umbraco.Core/Models/ContentScheduleCollection.cs b/src/Umbraco.Core/Models/ContentScheduleCollection.cs
index 4c06f8927d..6c7dd79312 100644
--- a/src/Umbraco.Core/Models/ContentScheduleCollection.cs
+++ b/src/Umbraco.Core/Models/ContentScheduleCollection.cs
@@ -31,7 +31,7 @@ namespace Umbraco.Core.Models
_schedule[schedule.Culture] = changes;
}
- //TODO: Below will throw if there are duplicate dates added, validate/return bool?
+ // TODO: Below will throw if there are duplicate dates added, validate/return bool?
changes.Add(schedule.Date, schedule);
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, schedule));
@@ -62,7 +62,7 @@ namespace Umbraco.Core.Models
if (!releaseDate.HasValue && !expireDate.HasValue) return false;
- //TODO: Do we allow passing in a release or expiry date that is before now?
+ // TODO: Do we allow passing in a release or expiry date that is before now?
if (!_schedule.TryGetValue(culture, out var changes))
{
@@ -70,7 +70,7 @@ namespace Umbraco.Core.Models
_schedule[culture] = changes;
}
- //TODO: Below will throw if there are duplicate dates added, should validate/return bool?
+ // TODO: Below will throw if there are duplicate dates added, should validate/return bool?
// but the bool won't indicate which date was in error, maybe have 2 diff methods to schedule start/end?
if (releaseDate.HasValue)
diff --git a/src/Umbraco.Core/Models/ContentTypeBase.cs b/src/Umbraco.Core/Models/ContentTypeBase.cs
index dadc3870b0..064bdd3d4a 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]
- //todo 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/ContentTypeBaseExtensions.cs b/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs
index adbc3de54f..51c642c20d 100644
--- a/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs
+++ b/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs
@@ -48,7 +48,7 @@ namespace Umbraco.Core.Models
throw new Exception("oops");
// skip new properties
- //TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly
+ // TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly
var isNewProperty = dirtyProperty.WasPropertyDirty("Id");
if (isNewProperty) return false;
diff --git a/src/Umbraco.Core/Models/GridValue.cs b/src/Umbraco.Core/Models/GridValue.cs
index c4a8b85b00..157304463f 100644
--- a/src/Umbraco.Core/Models/GridValue.cs
+++ b/src/Umbraco.Core/Models/GridValue.cs
@@ -5,7 +5,7 @@ using Newtonsoft.Json.Linq;
namespace Umbraco.Core.Models
{
- //TODO: Make a property value converter for this!
+ // TODO: Make a property value converter for this!
///
/// A model representing the value saved for the grid
@@ -21,7 +21,7 @@ namespace Umbraco.Core.Models
public class GridSection
{
[JsonProperty("grid")]
- public string Grid { get; set; } //todo: 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; } //todo: 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 b3b4e03783..4363324c8d 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; }
- // todo - 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/IContentTypeComposition.cs b/src/Umbraco.Core/Models/IContentTypeComposition.cs
index 84e436e46f..675d3cd268 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.
///
- //todo: 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 d118cd526e..f5c21a3a74 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; //todo inject
+ _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; //todo inject
+ _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 2945856817..e281aaf5ab 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;
- //todo would need to be adjusted to variations, when media become 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/Member.cs b/src/Umbraco.Core/Models/Member.cs
index c47f68c930..0ef15ee413 100644
--- a/src/Umbraco.Core/Models/Member.cs
+++ b/src/Umbraco.Core/Models/Member.cs
@@ -189,7 +189,7 @@ namespace Umbraco.Core.Models
[DataMember]
public IEnumerable Groups { get; set; }
- //TODO: When get/setting all of these properties we MUST:
+ // TODO: When get/setting all of these properties we MUST:
// * Check if we are using the umbraco membership provider, if so then we need to use the configured fields - not the explicit fields below
// * If any of the fields don't exist, what should we do? Currently it will throw an exception!
@@ -338,7 +338,7 @@ namespace Umbraco.Core.Models
return tryConvert.Result;
}
return false;
- //TODO: Use TryConvertTo instead
+ // TODO: Use TryConvertTo instead
}
set
{
@@ -371,7 +371,7 @@ namespace Umbraco.Core.Models
return tryConvert.Result;
}
return default(DateTime);
- //TODO: Use TryConvertTo instead
+ // TODO: Use TryConvertTo instead
}
set
{
@@ -404,7 +404,7 @@ namespace Umbraco.Core.Models
return tryConvert.Result;
}
return default(DateTime);
- //TODO: Use TryConvertTo instead
+ // TODO: Use TryConvertTo instead
}
set
{
@@ -437,7 +437,7 @@ namespace Umbraco.Core.Models
return tryConvert.Result;
}
return default(DateTime);
- //TODO: Use TryConvertTo instead
+ // TODO: Use TryConvertTo instead
}
set
{
@@ -471,7 +471,7 @@ namespace Umbraco.Core.Models
return tryConvert.Result;
}
return default(int);
- //TODO: Use TryConvertTo instead
+ // TODO: Use TryConvertTo instead
}
set
{
diff --git a/src/Umbraco.Core/Models/MemberType.cs b/src/Umbraco.Core/Models/MemberType.cs
index bcc7e14fd7..1ce883d9a7 100644
--- a/src/Umbraco.Core/Models/MemberType.cs
+++ b/src/Umbraco.Core/Models/MemberType.cs
@@ -66,7 +66,7 @@ namespace Umbraco.Core.Models
// leading underscores which we don't want in this case.
// see : http://issues.umbraco.org/issue/U4-3968
- //TODO: BUT, I'm pretty sure we could do this with regards to underscores now:
+ // TODO: BUT, I'm pretty sure we could do this with regards to underscores now:
// .ToCleanString(CleanStringType.Alias | CleanStringType.UmbracoCase)
// Need to ask Stephen
diff --git a/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs b/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs
index ed3422d4f9..debce3afe5 100644
--- a/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs
+++ b/src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs
@@ -44,7 +44,7 @@ namespace Umbraco.Core.Models.Membership
_isLockedOut = member.IsLockedOut;
_creationDate = member.CreateDate.ToUniversalTime();
_lastLoginDate = member.LastLoginDate.ToUniversalTime();
- //TODO: We currently don't really have any place to store this data!!
+ // TODO: We currently don't really have any place to store this data!!
_lastActivityDate = member.LastLoginDate.ToUniversalTime();
_lastPasswordChangedDate = member.LastPasswordChangeDate.ToUniversalTime();
_lastLockoutDate = member.LastLockoutDate.ToUniversalTime();
diff --git a/src/Umbraco.Core/Models/Membership/User.cs b/src/Umbraco.Core/Models/Membership/User.cs
index 942c71f0c6..7832390b92 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; //todo inject
+ _language = Current.Configs.Global().DefaultUILanguage; // TODO: inject
_isApproved = true;
_isLockedOut = false;
_startContentIds = new int[] { };
@@ -242,7 +242,7 @@ namespace Umbraco.Core.Models.Membership
set { SetPropertyValueAndDetectChanges(value, ref _failedLoginAttempts, Ps.Value.FailedPasswordAttemptsSelector); }
}
- //TODO: Figure out how to support all of this! - we cannot have NotImplementedExceptions because these get used by the IMembershipMemberService service so
+ // TODO: Figure out how to support all of this! - we cannot have NotImplementedExceptions because these get used by the IMembershipMemberService service so
// we'll just have them as generic get/set which don't interact with the db.
[IgnoreDataMember]
diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs
index ac460ca34c..f4ed11e09e 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; } //todo: 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; } //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 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/Packaging/PreInstallWarnings.cs b/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs
index f0acb2a46b..69c7a5641d 100644
--- a/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs
+++ b/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Models.Packaging
public IEnumerable UnsecureFiles { get; set; } = Enumerable.Empty();
public IEnumerable FilesReplaced { get; set; } = Enumerable.Empty();
- //TODO: Shouldn't we detect other conflicting entities too ?
+ // TODO: Shouldn't we detect other conflicting entities too ?
public IEnumerable ConflictingMacros { get; set; } = Enumerable.Empty();
public IEnumerable ConflictingTemplates { get; set; } = Enumerable.Empty();
public IEnumerable ConflictingStylesheets { get; set; } = Enumerable.Empty();
diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs
index 5e45475dd2..11b5239a70 100644
--- a/src/Umbraco.Core/Models/Property.cs
+++ b/src/Umbraco.Core/Models/Property.cs
@@ -55,7 +55,7 @@ namespace Umbraco.Core.Models
///
public class PropertyValue
{
- //TODO: Either we allow change tracking at this class level, or we add some special change tracking collections to the Property
+ // TODO: Either we allow change tracking at this class level, or we add some special change tracking collections to the Property
// class to deal with change tracking which variants have changed
private string _culture;
@@ -103,7 +103,7 @@ namespace Umbraco.Core.Models
// ReSharper disable once ClassNeverInstantiated.Local
private class PropertySelectors
{
- //TODO: This allows us to track changes for an entire Property, but doesn't allow us to track changes at the variant level
+ // TODO: This allows us to track changes for an entire Property, but doesn't allow us to track changes at the variant level
public readonly PropertyInfo ValuesSelector = ExpressionHelper.GetPropertyInfo(x => x.Values);
public readonly DelegateEqualityComparer
internal bool IsValid(string culture = "*", string segment = "*")
{
- //todo - 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)
{
- //todo - 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 ef56ce4a4c..5e71fe9f65 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) // todo - 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 5fe47b52a4..26e0fef178 100644
--- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs
+++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs
@@ -14,12 +14,12 @@ namespace Umbraco.Core.Models
///
[Serializable]
[DataContract]
- //TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details
+ // TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details
public class PropertyGroupCollection : KeyedCollection, INotifyCollectionChanged, IDeepCloneable
{
private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim();
- //todo: 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 c0dcddc6ae..63cf870221 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
{
- // todo: 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 377e86d2e5..107831ebdd 100644
--- a/src/Umbraco.Core/Models/PropertyType.cs
+++ b/src/Umbraco.Core/Models/PropertyType.cs
@@ -378,14 +378,14 @@ namespace Umbraco.Core.Models
}
- //todo - 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]; // todo inject
- var configuration = Current.Services.DataTypeService.GetDataType(_dataTypeId).Configuration; // todo 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 6753ee7532..e79015d828 100644
--- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs
+++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs
@@ -13,13 +13,13 @@ namespace Umbraco.Core.Models
///
[Serializable]
[DataContract]
- //TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details
+ // TODO: Change this to ObservableDictionary so we can reduce the INotifyCollectionChanged implementation details
public class PropertyTypeCollection : KeyedCollection, INotifyCollectionChanged, IDeepCloneable
{
[IgnoreDataMember]
private readonly ReaderWriterLockSlim _addLocker = new ReaderWriterLockSlim();
- //todo: This doesn't seem to be used
+ // TODO: This doesn't seem to be used
[IgnoreDataMember]
internal Action OnAdd;
@@ -76,12 +76,12 @@ namespace Umbraco.Core.Models
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
}
- //TODO: Instead of 'new' this should explicitly implement one of the collection interfaces members
+ // TODO: Instead of 'new' this should explicitly implement one of the collection interfaces members
internal new void Add(PropertyType item)
{
item.IsPublishing = IsPublishing;
- // todo this is not pretty and should be refactored
+ // 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 c5fa0330f2..d38c8eb721 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs
@@ -15,7 +15,7 @@ namespace Umbraco.Core.Models.PublishedContent
{
#region Content
- // todo - IPublishedContent properties colliding with models
+ // TODO: IPublishedContent properties colliding with models
// we need to find a way to remove as much clutter as possible from IPublishedContent,
// since this is preventing someone from creating a property named 'Path' and have it
// in a model, for instance. we could move them all under one unique property eg
@@ -153,8 +153,19 @@ namespace Umbraco.Core.Models.PublishedContent
///
bool IsDraft(string culture = null);
- // fixme/task - consider having an IsPublished flag too
- // so that when IsDraft is true, we can check whether there is a published version?
+ ///
+ /// Gets a value indicating whether the content is published.
+ ///
+ ///
+ /// A content is published when it has a published version.
+ /// When retrieving documents from cache in non-preview mode, IsPublished is always
+ /// true, as only published documents are returned. When retrieving in draft mode, IsPublished
+ /// can either be true (document has a published version) or false (document has no
+ /// published version).
+ /// It is therefore possible for both IsDraft and IsPublished to be true at the same
+ /// time, meaning that the content is the draft version, and a published version exists.
+ ///
+ bool IsPublished(string culture = null);
#endregion
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs
index 083e8dcc6e..0798e9a4e0 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs
@@ -86,7 +86,7 @@ namespace Umbraco.Core.Models.PublishedContent
}
}
- // todo - 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) },
@@ -148,7 +148,8 @@ namespace Umbraco.Core.Models.PublishedContent
return -1;
}
- // virtual for unit tests - todo explain why
+ // virtual for unit tests
+ // TODO: explain why
///
/// Gets a property type.
///
@@ -158,7 +159,8 @@ namespace Umbraco.Core.Models.PublishedContent
return GetPropertyType(index);
}
- // virtual for unit tests - todo explain why
+ // virtual for unit tests
+ // TODO: explain why
///
/// Gets a property type.
///
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs
index 36755c8944..8bf8cec244 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs
@@ -111,6 +111,9 @@ namespace Umbraco.Core.Models.PublishedContent
///
public virtual bool IsDraft(string culture = null) => _content.IsDraft(culture);
+ ///
+ public virtual bool IsPublished(string culture = null) => _content.IsPublished(culture);
+
#endregion
#region Tree
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
index 0860fdb822..68892fd79a 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
{
- //todo - 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/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs
index e14d7ee2de..f9aa1113b3 100644
--- a/src/Umbraco.Core/Models/UserExtensions.cs
+++ b/src/Umbraco.Core/Models/UserExtensions.cs
@@ -136,7 +136,7 @@ namespace Umbraco.Core.Models
try
{
var culture = CultureInfo.GetCultureInfo(userLanguage.Replace("_", "-"));
- //TODO: This is a hack because we store the user language as 2 chars instead of the full culture
+ // TODO: This is a hack because we store the user language as 2 chars instead of the full culture
// which is actually stored in the language files (which are also named with 2 chars!) so we need to attempt
// to convert to a supported full culture
var result = textService.ConvertToSupportedCultureWithRegionCode(culture);
diff --git a/src/Umbraco.Core/ObjectExtensions.cs b/src/Umbraco.Core/ObjectExtensions.cs
index 1a66cb96fb..68bc9c923d 100644
--- a/src/Umbraco.Core/ObjectExtensions.cs
+++ b/src/Umbraco.Core/ObjectExtensions.cs
@@ -143,7 +143,7 @@ namespace Umbraco.Core
// Special case for empty strings for bools/dates which should return null if an empty string.
if (input is string inputString)
{
- //TODO: Why the check against only bool/date when a string is null/empty? In what scenario can we convert to another type when the string is null or empty other than just being null?
+ // TODO: Why the check against only bool/date when a string is null/empty? In what scenario can we convert to another type when the string is null or empty other than just being null?
if (string.IsNullOrEmpty(inputString) && (underlying == typeof(DateTime) || underlying == typeof(bool)))
{
return Attempt.Succeed(null);
@@ -391,7 +391,7 @@ namespace Umbraco.Core
}
internal static void CheckThrowObjectDisposed(this IDisposable disposable, bool isDisposed, string objectname)
{
- //TODO: Localize this exception
+ // TODO: Localize this exception
if (isDisposed)
throw new ObjectDisposedException(objectname);
}
diff --git a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs
index 72dc0cb325..a569954629 100644
--- a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs
+++ b/src/Umbraco.Core/Packaging/PackageDataInstallation.cs
@@ -100,7 +100,7 @@ namespace Umbraco.Core.Packaging
//Order the DocumentTypes before removing them
if (contentTypes.Any())
{
- //TODO: I don't think this ordering is necessary
+ // TODO: I don't think this ordering is necessary
var orderedTypes = (from contentType in contentTypes
orderby contentType.ParentId descending, contentType.Id descending
select contentType).ToList();
@@ -710,7 +710,7 @@ namespace Umbraco.Core.Packaging
// This means that the property will not be created.
if (dataTypeDefinition == null)
{
- //TODO: We should expose this to the UI during install!
+ // TODO: We should expose this to the UI during install!
_logger.Warn("Packager: Error handling creation of PropertyType '{PropertyType}'. Could not find DataTypeDefintion with unique id '{DataTypeDefinitionId}' nor one referencing the DataType with a property editor alias (or legacy control id) '{PropertyEditorAlias}'. Did the package creator forget to package up custom datatypes? This property will be converted to a label/readonly editor if one exists.",
property.Element("Name").Value, dataTypeDefinitionId, property.Element("Type").Value.Trim());
diff --git a/src/Umbraco.Core/Packaging/PackageFileInstallation.cs b/src/Umbraco.Core/Packaging/PackageFileInstallation.cs
index 7c0891175b..29afc11d83 100644
--- a/src/Umbraco.Core/Packaging/PackageFileInstallation.cs
+++ b/src/Umbraco.Core/Packaging/PackageFileInstallation.cs
@@ -65,7 +65,7 @@ namespace Umbraco.Core.Packaging
var file = IOHelper.FindFile(item);
if (file != null)
{
- //TODO: Surely this should be ~/ ?
+ // TODO: Surely this should be ~/ ?
file = file.EnsureStartsWith("/");
var filePath = IOHelper.MapPath(file);
diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs
index dcf3b62e55..05f67b3ed6 100644
--- a/src/Umbraco.Core/Packaging/PackagesRepository.cs
+++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs
@@ -362,7 +362,7 @@ namespace Umbraco.Core.Packaging
new XAttribute("importMode", "root"),
contentXml)));
- //TODO: I guess tags has been broken for a very long time for packaging, we should get this working again sometime
+ // TODO: I guess tags has been broken for a very long time for packaging, we should get this working again sometime
////Create the TagProperties node - this is used to store a definition for all
//// document properties that are tags, this ensures that we can re-import tags properly
//XmlNode tagProps = new XElement("TagProperties");
diff --git a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs
index bfbde592b5..7898a9997a 100644
--- a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs
+++ b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs
@@ -14,8 +14,8 @@ namespace Umbraco.Core
public const string Node = /*TableNamePrefix*/ "umbraco" + "Node";
public const string NodeData = /*TableNamePrefix*/ "cms" + "ContentNu";
- 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 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";
public const string ContentChildType = /*TableNamePrefix*/ "cms" + "ContentTypeAllowedContentType";
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs b/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs
index ada26358dc..65d677d240 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")] // todo: db rename to 'updateDate'
+ [Column("date")] // TODO: db rename to 'updateDate'
public DateTime UpdateDate { get; set; }
- [Column("availableUserId")] // todo: 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 287e812211..3c2c3deda4 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")] // todo: db rename to 'updateDate'
+ [Column("versionDate")] // TODO: db rename to 'updateDate'
[Constraint(Default = SystemMethods.CurrentDateTime)]
public DateTime VersionDate { get; set; }
- [Column("userId")] // todo: 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
- //todo - 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 a0e526b62e..d270c7b732 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; } // todo should this have a length
+ public string EditorAlias { get; set; } // TODO: should this have a length
[Column("dbType")]
[Length(50)]
diff --git a/src/Umbraco.Core/Persistence/Dtos/LogDto.cs b/src/Umbraco.Core/Persistence/Dtos/LogDto.cs
index 9a710c1fec..bfd96426e2 100644
--- a/src/Umbraco.Core/Persistence/Dtos/LogDto.cs
+++ b/src/Umbraco.Core/Persistence/Dtos/LogDto.cs
@@ -35,12 +35,12 @@ namespace Umbraco.Core.Persistence.Dtos
[NullSetting(NullSetting = NullSettings.Null)]
public string EntityType { get; set; }
- //TODO: Should we have an index on this since we allow searching on it?
+ // TODO: Should we have an index on this since we allow searching on it?
[Column("Datestamp")]
[Constraint(Default = SystemMethods.CurrentDateTime)]
public DateTime Datestamp { get; set; }
- //TODO: Should we have an index on this since we allow searching on it?
+ // TODO: Should we have an index on this since we allow searching on it?
[Column("logHeader")]
[Length(50)]
public string Header { get; set; }
diff --git a/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs b/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs
index f9e70cce18..c4ea6a10fd 100644
--- a/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs
+++ b/src/Umbraco.Core/Persistence/Dtos/MemberTypeReadOnlyDto.cs
@@ -66,13 +66,13 @@ namespace Umbraco.Core.Persistence.Dtos
public bool AllowAtRoot { get; set; }
/* PropertyTypes */
- //TODO Add PropertyTypeDto (+MemberTypeDto and DataTypeDto as one) ReadOnly list
+ // TODO: Add PropertyTypeDto (+MemberTypeDto and DataTypeDto as one) ReadOnly list
[ResultColumn]
[Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeId")]
public List PropertyTypes { get; set; }
/* PropertyTypeGroups */
- //TODO Add PropertyTypeGroupDto ReadOnly list
+ // TODO: Add PropertyTypeGroupDto ReadOnly list
[ResultColumn]
[Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeNodeId")]
public List PropertyTypeGroups { get; set; }
diff --git a/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs b/src/Umbraco.Core/Persistence/Dtos/NodeDto.cs
index 8f50891b34..5800efb97a 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")] // todo: 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")] // todo: 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/EntityNotFoundException.cs b/src/Umbraco.Core/Persistence/EntityNotFoundException.cs
index 49e85046a0..e0fe778fa6 100644
--- a/src/Umbraco.Core/Persistence/EntityNotFoundException.cs
+++ b/src/Umbraco.Core/Persistence/EntityNotFoundException.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace Umbraco.Core.Persistence
{
- //TODO: Would be good to use this exception type anytime we cannot find an entity
+ // TODO: Would be good to use this exception type anytime we cannot find an entity
///
/// An exception used to indicate that an umbraco entity could not be found
diff --git a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs
index 97e172f98f..434e0393cd 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;
- // todo - 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;
- // todo 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;
- // todo 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
- // todo - only considering umbracoFile
+ // TODO: only considering umbracoFile
TryMatch(entity.GetValue("umbracoFile"), out var path);
@@ -309,7 +309,7 @@ namespace Umbraco.Core.Persistence.Factories
return dto;
}
- // todo - this should NOT be here?!
+ // TODO: this should NOT be here?!
// more dark magic ;-(
internal static bool TryMatch(string text, out string path)
{
diff --git a/src/Umbraco.Core/Persistence/LocalDb.cs b/src/Umbraco.Core/Persistence/LocalDb.cs
index 94e930abe9..55d6565344 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;
- // todo - shall we deal with stale databases?
- // todo - 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/NPocoDatabaseExtensions-Bulk.cs b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs
index b596ab60a3..09f754c47a 100644
--- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs
+++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs
@@ -17,7 +17,7 @@ namespace Umbraco.Core.Persistence
///
public static partial class NPocoDatabaseExtensions
{
- // todo: review NPoco native InsertBulk to replace the code below
+ // TODO: review NPoco native InsertBulk to replace the code below
///
/// Bulk-inserts records within a transaction.
@@ -177,8 +177,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; // todo - why repeat?
- // todo - 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 b8417d743d..248f91284f 100644
--- a/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs
+++ b/src/Umbraco.Core/Persistence/NPocoDatabaseExtensions.cs
@@ -32,7 +32,7 @@ namespace Umbraco.Core.Persistence
//
// works in READ COMMITED, TSQL & SQLCE lock the constraint even if it does not exist, so INSERT is OK
//
- // todo: use the proper database syntax, not this kludge
+ // TODO: use the proper database syntax, not this kludge
///
/// Safely inserts a record, or updates if it exists, based on a unique constraint.
@@ -81,7 +81,7 @@ namespace Umbraco.Core.Persistence
if (poco == null)
throw new ArgumentNullException(nameof(poco));
- // todo - 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 10735f865c..23d818f0b3 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)
{
- // todo - 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);
@@ -1180,7 +1180,7 @@ namespace Umbraco.Core.Persistence
private static string GetTableName(this Type type)
{
- // todo: returning string.Empty for now
+ // TODO: returning string.Empty for now
// BUT the code bits that calls this method cannot deal with string.Empty so we
// should either throw, or fix these code bits...
var attr = type.FirstAttribute();
diff --git a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs
index 64b3c91e50..d04930fa92 100644
--- a/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs
+++ b/src/Umbraco.Core/Persistence/Querying/ExpressionVisitorBase.cs
@@ -10,7 +10,7 @@ using Umbraco.Core.Composing;
namespace Umbraco.Core.Persistence.Querying
{
- // todo - 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 !
///
@@ -269,7 +269,7 @@ namespace Umbraco.Core.Persistence.Querying
protected virtual string VisitNew(NewExpression newExpression)
{
- // TODO : check !
+ // TODO: check !
var member = Expression.Convert(newExpression, typeof(object));
var lambda = Expression.Lambda>(member);
try
@@ -662,7 +662,7 @@ namespace Umbraco.Core.Persistence.Querying
// sql 'COALESCE(x,fb) = COALESCE(y,fb)' - of course, fb must be a value outside
// of x and y range - and if that is not possible, then a manual comparison need
// to be written
- //TODO support SqlNullableEquals with 0 parameters, using the full syntax below
+ // TODO: support SqlNullableEquals with 0 parameters, using the full syntax below
case "SqlNullableEquals":
var compareTo = Visit(m.Arguments[1]);
var fallback = Visit(m.Arguments[2]);
diff --git a/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs b/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs
index 9f57e61db9..a353f01f5b 100644
--- a/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs
+++ b/src/Umbraco.Core/Persistence/Querying/ModelToSqlExpressionVisitor.cs
@@ -79,7 +79,7 @@ namespace Umbraco.Core.Persistence.Querying
return string.Empty;
}
- //TODO: When m.Expression.NodeType == ExpressionType.Constant and it's an expression like: content => aliases.Contains(content.ContentType.Alias);
+ // TODO: When m.Expression.NodeType == ExpressionType.Constant and it's an expression like: content => aliases.Contains(content.ContentType.Alias);
// then an SQL parameter will be added for aliases as an array, however in SqlIn on the subclass it will manually add these SqlParameters anyways,
// however the query will still execute because the SQL that is written will only contain the correct indexes of SQL parameters, this would be ignored,
// I'm just unsure right now due to time constraints how to make it correct. It won't matter right now and has been working already with this bug but I've
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs
index 8057c87578..821f0941fc 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; // todo 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)
{
- // todo 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)
{
- // todo 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
}
}
- // todo should we do it when un-publishing? or?
+ // TODO: should we do it when un-publishing? or?
///
/// Clears tags for an item.
///
@@ -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
- // todo - 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
- // todo: 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
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
index 3bc730d5d0..7f41d2a456 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
@@ -271,7 +271,7 @@ AND umbracoNode.id <> @id",
compositionBase.RemovedContentTypeKeyTracker != null &&
compositionBase.RemovedContentTypeKeyTracker.Any())
{
- //TODO: Could we do the below with bulk SQL statements instead of looking everything up and then manipulating?
+ // TODO: Could we do the below with bulk SQL statements instead of looking everything up and then manipulating?
// find Content based on the current ContentType
var sql = Sql()
@@ -291,7 +291,7 @@ AND umbracoNode.id <> @id",
// based on the PropertyTypes that belong to the removed ContentType.
foreach (var contentDto in contentDtos)
{
- //TODO: This could be done with bulk SQL statements
+ // TODO: This could be done with bulk SQL statements
foreach (var propertyType in propertyTypes)
{
var nodeId = contentDto.NodeId;
@@ -343,8 +343,7 @@ AND umbracoNode.id <> @id",
List orphanPropertyTypeIds = null;
if (entity.IsPropertyDirty("PropertyGroups"))
{
- // todo
- // we used to try to propagate tabs renaming downstream, relying on ParentId, but
+ // TODO: we used to try to propagate tabs renaming downstream, relying on ParentId, but
// 1) ParentId makes no sense (if a tab can be inherited from multiple composition
// types) so we would need to figure things out differently, visiting downstream
// content types and looking for tabs with the same name...
@@ -438,7 +437,7 @@ AND umbracoNode.id <> @id",
case ContentVariation.CultureAndSegment:
case ContentVariation.Segment:
default:
- throw new NotSupportedException(); //TODO: Support this
+ throw new NotSupportedException(); // TODO: Support this
}
}
@@ -628,7 +627,7 @@ AND umbracoNode.id <> @id",
///
private void ClearScheduledPublishing(IContentTypeComposition contentType)
{
- //TODO: Fill this in when scheduled publishing is enabled for variants
+ // TODO: Fill this in when scheduled publishing is enabled for variants
}
///
@@ -671,7 +670,7 @@ AND umbracoNode.id <> @id",
case ContentVariation.CultureAndSegment:
case ContentVariation.Segment:
default:
- throw new NotSupportedException(); //TODO: Support this
+ throw new NotSupportedException(); // TODO: Support this
}
}
}
@@ -754,7 +753,7 @@ AND umbracoNode.id <> @id",
case ContentVariation.CultureAndSegment:
case ContentVariation.Segment:
default:
- throw new NotSupportedException(); //TODO: Support this
+ throw new NotSupportedException(); // TODO: Support this
}
}
@@ -1038,7 +1037,7 @@ AND umbracoNode.id <> @id",
var dtos = Database.Fetch(sql);
- //TODO Move this to a PropertyTypeFactory
+ // TODO: Move this to a PropertyTypeFactory
var list = new List();
foreach (var dto in dtos.Where(x => x.PropertyTypeGroupId <= 0))
{
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs
index f4f0da8bee..3de9e3c99b 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/task - get rid of Lazy injection and fix circular dependencies
+ // TODO: https://github.com/umbraco/Umbraco-CMS/issues/4237 - get rid of Lazy injection and fix circular dependencies
public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger)
: base(scopeAccessor, cache, logger)
{
@@ -111,7 +111,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
//ensure a datatype has a unique name before creating it
entity.Name = EnsureUniqueNodeName(entity.Name);
- //TODO: should the below be removed?
+ // TODO: should the below be removed?
//Cannot add a duplicate data type
var existsSql = Sql()
.SelectCount()
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
index 344c0b9489..dcac7f4ff4 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
@@ -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")
- // todo - 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 =>
@@ -260,7 +260,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
protected override void PersistNewItem(IContent entity)
{
- // fixme/task - sort out IContent vs Content
+ // TODO: https://github.com/umbraco/Umbraco-CMS/issues/4234 - 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
@@ -277,7 +277,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
SanitizeNames(content, publishing);
// ensure that strings don't contain characters that are invalid in xml
- // todo - do we really want to keep doing this here?
+ // TODO: do we really want to keep doing this here?
entity.SanitizeEntityPropertiesForXmlStorage();
// create the dto
@@ -466,7 +466,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
SanitizeNames(content, publishing);
// ensure that strings don't contain characters that are invalid in xml
- // todo - 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
@@ -545,7 +545,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
edited = true;
(editedCultures ?? (editedCultures = new HashSet(StringComparer.OrdinalIgnoreCase))).Add(culture);
- // todo - 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
@@ -561,7 +561,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var deleteDocumentVariations = Sql().Delete().Where(x => x.NodeId == content.Id);
Database.Execute(deleteDocumentVariations);
- // todo NPoco InsertBulk issue?
+ // TODO: NPoco InsertBulk issue?
// we should use the native NPoco InsertBulk here but it causes problems (not sure exactly 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'.
@@ -622,8 +622,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
ClearEntityTags(entity, _tagRepository);
}
- // note re. tags: explicitly unpublished entities have cleared tags,
- // but masked or trashed entities *still* have tags in the db todo so what?
+ // TODO: note re. tags: explicitly unpublished entities have cleared tags, but masked or trashed entities *still* have tags in the db - so what?
entity.ResetDirtyProperties();
@@ -837,7 +836,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
}
// reading repository purely for looking up by GUID
- // todo - 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;
@@ -1124,7 +1123,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
// get properties - indexed by version id
var versionId = dto.DocumentVersionDto.Id;
- // todo - 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/DomainRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs
index fa06216f9b..01b8bdd66c 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs
@@ -12,7 +12,7 @@ using Umbraco.Core.Scoping;
namespace Umbraco.Core.Persistence.Repositories.Implement
{
- //TODO: We need to get a readonly ISO code for the domain assigned
+ // TODO: We need to get a readonly ISO code for the domain assigned
internal class DomainRepository : NPocoRepositoryBase, IDomainRepository
{
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs
index c531b991a9..85912694f0 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs
@@ -62,7 +62,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
ApplyOrdering(ref sql, ordering);
}
- //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
+ // 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");
@@ -73,7 +73,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
if (isContent)
BuildVariants(entities.Cast());
- //todo - 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);
@@ -166,7 +166,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var entities = dtos.Select(x => BuildEntity(false, isMedia, x)).ToArray();
- //todo- 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);
@@ -227,7 +227,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
return GetEntities(sql, isContent, isMedia, true);
}
- //todo- 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;
@@ -266,7 +266,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
return Database.ExecuteScalar(sql) > 0;
}
- //todo - 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));
@@ -274,7 +274,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
BuildProperty(entity, pdto);
}
- //todo - 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();
@@ -290,7 +290,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
}
}
- //todo - 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 ?!
@@ -539,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));
- //todo - 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 94714d6ded..38558e1ca5 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs
@@ -225,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
- // todo - do we really want to keep doing this here?
+ // TODO: do we really want to keep doing this here?
entity.SanitizeEntityPropertiesForXmlStorage();
// create the dto
@@ -304,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
- // todo - 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
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs
index e6ee79470c..ff7a79f98e 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs
@@ -298,7 +298,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
public int MemberGroupId { get; set; }
}
- // todo - understand why we need these two repository-level events, move them back to service
+ // TODO: understand why we need these two repository-level events, move them back to service
///
/// Occurs before Save
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs
index 9d7556f356..ba3526f1f0 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);
- // todo 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) // todo 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;
}
- // todo - 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() // todo - can we kill / refactor this?
+ protected override string GetBaseWhereClause() // TODO: can we kill / refactor this?
{
return "umbracoNode.id = @id";
}
- // todo document/understand that one
+ // 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
- // todo - 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
- // todo - 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
@@ -460,7 +460,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var subQuery = Sql().Select("Member").From().Where(dto => dto.MemberGroup == memberGroup.Id);
var sql = GetBaseQuery(false)
- //TODO: An inner join would be better, though I've read that the query optimizer will always turn a
+ // TODO: An inner join would be better, though I've read that the query optimizer will always turn a
// subquery with an IN clause into an inner join anyways.
.Append("WHERE umbracoNode.id IN (" + subQuery.SQL + ")", subQuery.Arguments)
.OrderByDescending(x => x.VersionDate)
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs
index a0ba2d5aa3..23236ec9f0 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); // todo 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 84e8ffc172..a7e366a94f 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
}
}
- // todo - 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;
@@ -207,7 +207,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
//ensure they are de-duplicated, easy win if people don't do this as this can cause many excess queries
ids = ids.Distinct()
//don't query by anything that is a default of T (like a zero)
- //TODO: I think we should enabled this in case accidental calls are made to get all with invalid ids
+ // TODO: I think we should enabled this in case accidental calls are made to get all with invalid ids
//.Where(x => Equals(x, default(TId)) == false)
.ToArray();
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs
index b4aa9c27f9..2bad7229f2 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()
{
- // todo - 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/TagRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs
index 7dd3f03407..f26fcca81b 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs
@@ -254,8 +254,7 @@ WHERE r.tagId IS NULL";
#region Queries
- // TODO
- // consider caching implications
+ // TODO: consider caching implications
// add lookups for parentId or path (ie get content in tag group, that are descendants of x)
// ReSharper disable once ClassNeverInstantiated.Local
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
index a183894462..b348317989 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
@@ -407,13 +407,12 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
template.UpdateDate = fs.GetLastModified(filename).UtcDateTime;
}
- // TODO
- // see if this could enable us to update UpdateDate without messing with change tracking
- // and then we'd want to do it for scripts, stylesheets and partial views too (ie files)
- //var xtemplate = template as Template;
- //xtemplate.DisableChangeTracking();
- //template.UpdateDate = fs.GetLastModified(filename).UtcDateTime;
- //xtemplate.EnableChangeTracking();
+ // TODO: see if this could enable us to update UpdateDate without messing with change tracking
+ // and then we'd want to do it for scripts, stylesheets and partial views too (ie files)
+ // var xtemplate = template as Template;
+ // xtemplate.DisableChangeTracking();
+ // template.UpdateDate = fs.GetLastModified(filename).UtcDateTime;
+ // xtemplate.EnableChangeTracking();
template.VirtualPath = fs.GetUrl(filename);
@@ -580,9 +579,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
public bool ValidateTemplate(ITemplate template)
{
// get path
- // TODO
- // templates should have a real Path somehow - but anyways
- // are we using Path for something else?!
+ // TODO: templates should have a real Path somehow - but anyways
+ // are we using Path for something else?!
var path = template.VirtualPath;
// get valid paths
@@ -652,7 +650,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
private string EnsureUniqueAlias(ITemplate template, int attempts)
{
- //TODO: This is ported from the old data layer... pretty crap way of doing this but it works for now.
+ // TODO: This is ported from the old data layer... pretty crap way of doing this but it works for now.
if (AliasAlreadExists(template))
return template.Alias + attempts;
attempts++;
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
index b42060b6cc..3935027ada 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
+++ b/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
@@ -128,7 +128,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
{
foreach (var nodeId in nodeIds)
{
- //TODO: We could/should change the EntityPermissionsCollection into a KeyedCollection and they key could be
+ // TODO: We could/should change the EntityPermissionsCollection into a KeyedCollection and they key could be
// a struct of the nodeid + groupid so then we don't actually allocate this class just to check if it's not
// going to be included in the result!
@@ -444,7 +444,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
/// Ids of users
private void AddUsersToGroup(int groupId, int[] userIds)
{
- //TODO: Check if the user exists?
+ // TODO: Check if the user exists?
foreach (var userId in userIds)
{
var dto = new User2UserGroupDto
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs
index 2242c65256..07ad6bcba9 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;
- // todo - 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
@@ -169,7 +169,7 @@ ORDER BY colName";
public Guid CreateLoginSession(int userId, string requestingIpAddress, bool cleanStaleSessions = true)
{
- //TODO: I know this doesn't follow the normal repository conventions which would require us to create a UserSessionRepository
+ // TODO: I know this doesn't follow the normal repository conventions which would require us to create a UserSessionRepository
//and also business logic models for these objects but that's just so overkill for what we are doing
//and now that everything is properly in a transaction (Scope) there doesn't seem to be much reason for using that anymore
var now = DateTime.UtcNow;
@@ -238,7 +238,7 @@ ORDER BY colName";
public void ClearLoginSession(Guid sessionId)
{
- // todo 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));
@@ -443,7 +443,7 @@ ORDER BY colName";
var userDto = UserFactory.BuildDto(entity);
// check if we have a known config, we only want to store config for hashing
- //TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089
+ // TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089
if (PasswordConfigJson != null)
userDto.PasswordConfig = PasswordConfigJson;
@@ -538,7 +538,7 @@ ORDER BY colName";
}
// check if we have a known config, we only want to store config for hashing
- //TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089
+ // TODO: This logic will need to be updated when we do http://issues.umbraco.org/issue/U4-10089
if (PasswordConfigJson != null)
{
userDto.PasswordConfig = PasswordConfigJson;
@@ -573,7 +573,7 @@ ORDER BY colName";
: Database.Fetch("SELECT * FROM umbracoUserGroup WHERE userGroupAlias IN (@aliases)", new { aliases = entity.Groups.Select(x => x.Alias) });
//first delete all
- //TODO: We could do this a nicer way instead of "Nuke and Pave"
+ // TODO: We could do this a nicer way instead of "Nuke and Pave"
Database.Delete("WHERE UserId = @UserId", new { UserId = entity.Id });
foreach (var groupDto in assigned)
diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
index d6ceeaa3e6..5b6a9afb04 100644
--- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
+++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
@@ -500,7 +500,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
if (column.DefaultValue == null)
return string.Empty;
- //hack - probably not needed with latest changes
+ // HACK: probably not needed with latest changes
if (column.DefaultValue.ToString().ToLower().Equals("getdate()".ToLower()))
column.DefaultValue = SystemMethods.CurrentDateTime;
diff --git a/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs b/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs
index 43ef03327b..2fba8e7d49 100644
--- a/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs
+++ b/src/Umbraco.Core/Persistence/SqlSyntaxExtensions.cs
@@ -13,7 +13,7 @@ namespace Umbraco.Core.Persistence
{
private static string GetTableName(this Type type)
{
- // todo: returning string.Empty for now
+ // TODO: returning string.Empty for now
// BUT the code bits that calls this method cannot deal with string.Empty so we
// should either throw, or fix these code bits...
var attr = type.FirstAttribute();
diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs
index 4e795d3a78..51e0172f35 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
- // todo - has new interceptors to replace OnSomething?
+ // TODO: has new interceptors to replace OnSomething?
protected override DbConnection OnConnectionOpened(DbConnection connection)
{
@@ -218,7 +218,7 @@ namespace Umbraco.Core.Persistence
cmd.CommandTimeout = cmd.Connection.ConnectionTimeout;
if (EnableSqlTrace)
- _logger.Debug("SQL Trace:\r\n{Sql}", CommandToString(cmd).Replace("{", "{{").Replace("}", "}}")); // todo 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 cd6da569c5..eab0ae5509 100644
--- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs
+++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs
@@ -22,8 +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!
+ // TODO: these comments are not true anymore
+ // TODO: this class needs not be disposable!
internal class UmbracoDatabaseFactory : DisposableObject, IUmbracoDatabaseFactory
{
private readonly Lazy _mappers;
@@ -59,14 +59,18 @@ namespace Umbraco.Core.Persistence
/// Used by the other ctor and in tests.
public UmbracoDatabaseFactory(string connectionStringName, ILogger logger, Lazy mappers)
{
- if (string.IsNullOrWhiteSpace(connectionStringName)) throw new ArgumentNullOrEmptyException(nameof(connectionStringName));
+ if (string.IsNullOrWhiteSpace(connectionStringName))
+ throw new ArgumentNullOrEmptyException(nameof(connectionStringName));
_mappers = mappers ?? throw new ArgumentNullException(nameof(mappers));
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
var settings = ConfigurationManager.ConnectionStrings[connectionStringName];
if (settings == null)
+ {
+ logger.Debug("Missing connection string, defer configuration.");
return; // not configured
+ }
// could as well be
// so need to test the values too
@@ -74,7 +78,7 @@ namespace Umbraco.Core.Persistence
var providerName = settings.ProviderName;
if (string.IsNullOrWhiteSpace(connectionString) || string.IsNullOrWhiteSpace(providerName))
{
- logger.Debug("Missing connection string or provider name, defer configuration.");
+ logger.Debug("Empty connection string or provider name, defer configuration.");
return; // not configured
}
@@ -284,7 +288,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...
- // todo - the class does not need be disposable
+ // TODO: the class does not need be disposable
//var db = _umbracoDatabaseAccessor.UmbracoDatabase;
//_umbracoDatabaseAccessor.UmbracoDatabase = null;
//db?.Dispose();
@@ -295,7 +299,7 @@ namespace Umbraco.Core.Persistence
// this method provides a way to force-reset the variable
internal void ResetForTests()
{
- // todo remove all this eventually
+ // TODO: remove all this eventually
//var db = _umbracoDatabaseAccessor.UmbracoDatabase;
//_umbracoDatabaseAccessor.UmbracoDatabase = null;
//db?.Dispose();
diff --git a/src/Umbraco.Core/PropertyEditors/DataEditor.cs b/src/Umbraco.Core/PropertyEditors/DataEditor.cs
index 0db6dcb0dd..ae6ace996e 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.
///
- // todo 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; // todo 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 153039dedb..096b80de1f 100644
--- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
+++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
@@ -283,7 +283,7 @@ namespace Umbraco.Core.PropertyEditors
}
}
- // todo - 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 16aa4d6d5c..e7aa68459e 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(); // todo - 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 c92b6fa0d3..cb68531cc7 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.
- /// todo replace with AddValidator? WithValidator?
+ /// TODO: replace with AddValidator? WithValidator?
///
List Validators { get; }
@@ -61,7 +61,7 @@ namespace Umbraco.Core.PropertyEditors
///
object ToEditor(Property property, IDataTypeService dataTypeService, string culture = null, string segment = null);
- // todo / deal with this when unplugging the xml cache
+ // 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 204dff6f19..62f2e0ca1d 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}\".");
- // todo - what is this exactly?
+ // 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/TagsPropertyEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs
index e1f99083e8..2439c7c02e 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.
///
- // todo: what's the usage?
+ // TODO: what's the usage?
public bool ReplaceTags { get; set; }
///
diff --git a/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs
index 3891d7952b..c3dca609d2 100644
--- a/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs
+++ b/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs
@@ -23,7 +23,7 @@ namespace Umbraco.Core.PropertyEditors.Validators
///
public IEnumerable Validate(object value, string valueType, object dataTypeConfiguration)
{
- //TODO: localize these!
+ // TODO: localize these!
if (value != null)
{
var delimiter = ",";
diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs
index d4cee4762f..e04893716a 100644
--- a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs
+++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs
@@ -65,6 +65,6 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
return sourceString;
}
- //TODO: Now to convert that to XPath!
+ // TODO: Now to convert that to XPath!
}
}
diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs
index 12594eb842..31ab47223f 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
- // todo: this is cheap now, remove the caching
+ // TODO: this is cheap now, remove the caching
return Storages.GetOrAdd(dataTypeId, id =>
{
diff --git a/src/Umbraco.Core/Runtime/CoreRuntime.cs b/src/Umbraco.Core/Runtime/CoreRuntime.cs
index 13e6aae149..9c18b3d8c3 100644
--- a/src/Umbraco.Core/Runtime/CoreRuntime.cs
+++ b/src/Umbraco.Core/Runtime/CoreRuntime.cs
@@ -100,6 +100,9 @@ namespace Umbraco.Core.Runtime
// throws if not full-trust
new AspNetHostingPermission(AspNetHostingPermissionLevel.Unrestricted).Demand();
+ // run handlers
+ RuntimeOptions.DoRuntimeBoot(ProfilingLogger);
+
// application caches
var appCaches = GetAppCaches();
@@ -131,12 +134,17 @@ namespace Umbraco.Core.Runtime
composition = new Composition(register, typeLoader, ProfilingLogger, _state, configs);
composition.RegisterEssentials(Logger, Profiler, ProfilingLogger, mainDom, appCaches, databaseFactory, typeLoader, _state);
+ // run handlers
+ RuntimeOptions.DoRuntimeEssentials(composition, appCaches, typeLoader, databaseFactory);
+
// register runtime-level services
// there should be none, really - this is here "just in case"
Compose(composition);
- // acquire the main domain, determine our runtime level
+ // acquire the main domain
AcquireMainDom(mainDom);
+
+ // determine our runtime level
DetermineRuntimeLevel(databaseFactory, ProfilingLogger);
// get composers, and compose
@@ -288,7 +296,7 @@ namespace Umbraco.Core.Runtime
///
public virtual void Terminate()
{
- _components.Terminate();
+ _components?.Terminate();
}
///
diff --git a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs
index 5535d5c67b..8285b9b4fd 100644
--- a/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs
+++ b/src/Umbraco.Core/Runtime/CoreRuntimeComposer.cs
@@ -73,16 +73,20 @@ namespace Umbraco.Core.Runtime
// register a server registrar, by default it's the db registrar
composition.RegisterUnique(f =>
{
- if ("true".InvariantEquals(ConfigurationManager.AppSettings["umbracoDisableElectionForSingleServer"]))
- return new SingleServerRegistrar(f.GetInstance());
- return new DatabaseServerRegistrar(
- new Lazy(f.GetInstance),
- new DatabaseServerRegistrarOptions());
+ // TODO: this is a hack, use proper configuration!
+ // also: we still register the full IServerMessenger because
+ // even on 1 single server we can have 2 concurrent app domains
+ var singleServer = "true".InvariantEquals(ConfigurationManager.AppSettings["umbracoDisableElectionForSingleServer"]);
+ return singleServer
+ ? (IServerRegistrar) new SingleServerRegistrar(f.GetInstance())
+ : new DatabaseServerRegistrar(
+ new Lazy(f.GetInstance),
+ new DatabaseServerRegistrarOptions());
});
// 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 - todo - should obsolete the legacy thing
+ // this will be overridden by the db thing in the corresponding components in the web
+ // project
composition.RegisterUnique(factory
=> new DatabaseServerMessenger(
factory.GetInstance(),
diff --git a/src/Umbraco.Core/RuntimeOptions.cs b/src/Umbraco.Core/RuntimeOptions.cs
new file mode 100644
index 0000000000..1f89ee6314
--- /dev/null
+++ b/src/Umbraco.Core/RuntimeOptions.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Runtime.CompilerServices;
+using Umbraco.Core.Cache;
+using Umbraco.Core.Components;
+using Umbraco.Core.Composing;
+using Umbraco.Core.Logging;
+using Umbraco.Core.Persistence;
+
+namespace Umbraco.Core
+{
+ ///
+ /// Provides static options for the runtime.
+ ///
+ ///
+ /// These options can be configured in PreApplicationStart or via appSettings.
+ ///
+ public static class RuntimeOptions
+ {
+ private static List> _onBoot;
+ private static List> _onEssentials;
+ private static bool? _installMissingDatabase;
+ private static bool? _installEmptyDatabase;
+
+ // reads a boolean appSetting
+ private static bool BoolSetting(string key, bool missing) => ConfigurationManager.AppSettings[key]?.InvariantEquals("true") ?? missing;
+
+ ///
+ /// Gets a value indicating whether the runtime should enter Install level when the database is missing.
+ ///
+ ///
+ /// By default, when a database connection string is configured but it is not possible to
+ /// connect to the database, the runtime enters the BootFailed level. If this options is set to true,
+ /// it enters the Install level instead.
+ /// It is then up to the implementor, that is setting this value, to take over the installation
+ /// sequence.
+ ///
+ public static bool InstallMissingDatabase
+ {
+ get => _installEmptyDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallMissingDatabase", false);
+ set => _installEmptyDatabase = value;
+ }
+
+ ///
+ /// Gets a value indicating whether the runtime should enter Install level when the database is empty.
+ ///
+ ///
+ /// By default, when a database connection string is configured and it is possible to connect to
+ /// the database, but the database is empty, the runtime enters the BootFailed level. If this options
+ /// is set to true, it enters the Install level instead.
+ /// It is then up to the implementor, that is setting this value, to take over the installation
+ /// sequence.
+ ///
+ public static bool InstallEmptyDatabase
+ {
+ get => _installMissingDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallEmptyDatabase", false);
+ set => _installMissingDatabase = value;
+ }
+
+ ///
+ /// Executes the RuntimeBoot handlers.
+ ///
+ internal static void DoRuntimeBoot(IProfilingLogger logger)
+ {
+ if (_onBoot == null)
+ return;
+
+ foreach (var action in _onBoot)
+ action(logger);
+ }
+
+ ///
+ /// Executes the RuntimeEssentials handlers.
+ ///
+ internal static void DoRuntimeEssentials(Composition composition, AppCaches appCaches, TypeLoader typeLoader, IUmbracoDatabaseFactory databaseFactory)
+ {
+ if (_onEssentials== null)
+ return;
+
+ foreach (var action in _onEssentials)
+ action(composition, appCaches, typeLoader, databaseFactory);
+ }
+
+ ///
+ /// Registers a RuntimeBoot handler.
+ ///
+ ///
+ /// A RuntimeBoot handler runs when the runtime boots, right after the
+ /// loggers have been created, but before anything else.
+ ///
+ public static void OnRuntimeBoot(Action action)
+ {
+ if (_onBoot == null)
+ _onBoot = new List>();
+ _onBoot.Add(action);
+ }
+
+ ///
+ /// Registers a RuntimeEssentials handler.
+ ///
+ ///
+ /// A RuntimeEssentials handler runs after the runtime has created a few
+ /// essential things (AppCaches, a TypeLoader, and a database factory) but
+ /// before anything else.
+ ///
+ public static void OnRuntimeEssentials(Action action)
+ {
+ if (_onEssentials == null)
+ _onEssentials = new List>();
+ _onEssentials.Add(action);
+ }
+ }
+}
diff --git a/src/Umbraco.Core/RuntimeState.cs b/src/Umbraco.Core/RuntimeState.cs
index 85e8c7370d..b21c02fdb9 100644
--- a/src/Umbraco.Core/RuntimeState.cs
+++ b/src/Umbraco.Core/RuntimeState.cs
@@ -169,7 +169,7 @@ namespace Umbraco.Core
else if (databaseFactory.Configured == false)
{
// local version *does* match code version, but the database is not configured
- // install (again? this is a weird situation...)
+ // install - may happen with Deploy/Cloud/etc
logger.Debug("Database is not configured, need to install Umbraco.");
Level = RuntimeLevel.Install;
Reason = RuntimeLevelReason.InstallNoDatabase;
@@ -179,7 +179,7 @@ namespace Umbraco.Core
// else, keep going,
// anything other than install wants a database - see if we can connect
// (since this is an already existing database, assume localdb is ready)
- var tries = RuntimeStateOptions.InstallMissingDatabase ? 2 : 5;
+ var tries = RuntimeOptions.InstallMissingDatabase ? 2 : 5;
for (var i = 0;;)
{
connect = databaseFactory.CanConnect;
@@ -193,7 +193,7 @@ namespace Umbraco.Core
// cannot connect to configured database, this is bad, fail
logger.Debug("Could not connect to database.");
- if (RuntimeStateOptions.InstallMissingDatabase)
+ if (RuntimeOptions.InstallMissingDatabase)
{
// ok to install on a configured but missing database
Level = RuntimeLevel.Install;
@@ -222,7 +222,7 @@ namespace Umbraco.Core
// can connect to the database but cannot check the upgrade state... oops
logger.Warn(e, "Could not check the upgrade state.");
- if (RuntimeStateOptions.InstallEmptyDatabase)
+ if (RuntimeOptions.InstallEmptyDatabase)
{
// ok to install on an empty database
Level = RuntimeLevel.Install;
diff --git a/src/Umbraco.Core/RuntimeStateOptions.cs b/src/Umbraco.Core/RuntimeStateOptions.cs
deleted file mode 100644
index 9262a8a990..0000000000
--- a/src/Umbraco.Core/RuntimeStateOptions.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Configuration;
-
-namespace Umbraco.Core
-{
- ///
- /// Allows configuration of the in PreApplicationStart or in appSettings
- ///
- public static class RuntimeStateOptions
- {
- // configured statically or via app settings
- private static bool BoolSetting(string key, bool missing) => ConfigurationManager.AppSettings[key]?.InvariantEquals("true") ?? missing;
-
- ///
- /// If true the RuntimeState will continue the installation sequence when a database is missing
- ///
- ///
- /// In this case it will be up to the implementor that is setting this value to true to take over the bootup/installation sequence
- ///
- public static bool InstallMissingDatabase
- {
- get => _installEmptyDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallMissingDatabase", false);
- set => _installEmptyDatabase = value;
- }
-
- ///
- /// If true the RuntimeState will continue the installation sequence when a database is available but is empty
- ///
- ///
- /// In this case it will be up to the implementor that is setting this value to true to take over the bootup/installation sequence
- ///
- public static bool InstallEmptyDatabase
- {
- get => _installMissingDatabase ?? BoolSetting("Umbraco.Core.RuntimeState.InstallEmptyDatabase", false);
- set => _installMissingDatabase = value;
- }
-
- private static bool? _installMissingDatabase;
- private static bool? _installEmptyDatabase;
- }
-}
\ No newline at end of file
diff --git a/src/Umbraco.Core/Scoping/Scope.cs b/src/Umbraco.Core/Scoping/Scope.cs
index 6aeee33c41..f9ea02b072 100644
--- a/src/Umbraco.Core/Scoping/Scope.cs
+++ b/src/Umbraco.Core/Scoping/Scope.cs
@@ -85,7 +85,7 @@ namespace Umbraco.Core.Scoping
ParentScope = parent;
// cannot specify a different mode!
- // todo - 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));
@@ -264,7 +264,7 @@ namespace Umbraco.Core.Scoping
if (ParentScope != null) return ParentScope.Messages;
return _messages ?? (_messages = new EventMessages());
- // todo - 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
@@ -323,7 +323,7 @@ namespace Umbraco.Core.Scoping
if (_disposed)
throw new ObjectDisposedException(GetType().FullName);
- // todo - safer?
+ // TODO: safer?
//if (Interlocked.CompareExchange(ref _disposed, 1, 0) != 0)
// throw new ObjectDisposedException(GetType().FullName);
}
diff --git a/src/Umbraco.Core/Scoping/ScopeContext.cs b/src/Umbraco.Core/Scoping/ScopeContext.cs
index 3f70f1791e..7b62c5c7a2 100644
--- a/src/Umbraco.Core/Scoping/ScopeContext.cs
+++ b/src/Umbraco.Core/Scoping/ScopeContext.cs
@@ -13,10 +13,7 @@ namespace Umbraco.Core.Scoping
if (_enlisted == null)
return;
- // todo
- // - can we create infinite loops?
- // - 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;
while ((orderedEnlisted = _enlisted.Values.OrderBy(x => x.Priority).ToList()).Count > 0)
diff --git a/src/Umbraco.Core/Security/BackOfficeUserStore.cs b/src/Umbraco.Core/Security/BackOfficeUserStore.cs
index 2d9469180a..3d87482d60 100644
--- a/src/Umbraco.Core/Security/BackOfficeUserStore.cs
+++ b/src/Umbraco.Core/Security/BackOfficeUserStore.cs
@@ -30,9 +30,9 @@ namespace Umbraco.Core.Security
IUserTwoFactorStore,
IUserSessionStore
- //TODO: This would require additional columns/tables for now people will need to implement this on their own
+ // TODO: This would require additional columns/tables for now people will need to implement this on their own
//IUserPhoneNumberStore,
- //TODO: To do this we need to implement IQueryable - we'll have an IQuerable implementation soon with the UmbracoLinqPadDriver implementation
+ // TODO: To do this we need to implement IQueryable - we'll have an IQuerable implementation soon with the UmbracoLinqPadDriver implementation
//IQueryableUserStore
{
private readonly IUserService _userService;
@@ -99,7 +99,7 @@ namespace Umbraco.Core.Security
UpdateMemberProperties(userEntity, user);
- //TODO: We should deal with Roles --> User Groups here which we currently are not doing
+ // TODO: We should deal with Roles --> User Groups here which we currently are not doing
_userService.Save(userEntity);
@@ -720,7 +720,7 @@ namespace Umbraco.Core.Security
user.SecurityStamp = identityUser.SecurityStamp;
}
- //TODO: Fix this for Groups too
+ // TODO: Fix this for Groups too
if (identityUser.IsPropertyDirty("Roles") || identityUser.IsPropertyDirty("Groups"))
{
var userGroupAliases = user.Groups.Select(x => x.Alias).ToArray();
diff --git a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs
index ff595a5d45..8fc2cb77e4 100644
--- a/src/Umbraco.Core/Security/MembershipProviderExtensions.cs
+++ b/src/Umbraco.Core/Security/MembershipProviderExtensions.cs
@@ -161,7 +161,7 @@ namespace Umbraco.Core.Security
return (membershipProvider is UmbracoMembershipProviderBase);
}
- //TODO: Add role provider checks too
+ // TODO: Add role provider checks too
public static UmbracoMembershipProviderBase AsUmbracoMembershipProvider(this MembershipProvider membershipProvider)
{
diff --git a/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs
index 7fecb30fba..e09c861caa 100644
--- a/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs
+++ b/src/Umbraco.Core/Security/UserAwareMembershipProviderPasswordHasher.cs
@@ -15,14 +15,14 @@ namespace Umbraco.Core.Security
public string HashPassword(BackOfficeIdentityUser user, string password)
{
- //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089
+ // TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089
//NOTE: For now this just falls back to the hashing we are currently using
return base.HashPassword(password);
}
public PasswordVerificationResult VerifyHashedPassword(BackOfficeIdentityUser user, string hashedPassword, string providedPassword)
{
- //TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089
+ // TODO: Implement the logic for this, we need to lookup the password format for the user and hash accordingly: http://issues.umbraco.org/issue/U4-10089
//NOTE: For now this just falls back to the hashing we are currently using
return base.VerifyHashedPassword(hashedPassword, providedPassword);
}
diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs
index 3a3c43c6a0..7fb7450b46 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.
///
- // todo 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 3f398cc1e9..9d0399f324 100644
--- a/src/Umbraco.Core/Services/IEntityService.cs
+++ b/src/Umbraco.Core/Services/IEntityService.cs
@@ -242,8 +242,9 @@ namespace Umbraco.Core.Services
IEnumerable GetPagedDescendants(IEnumerable ids, UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords,
IQuery filter = null, Ordering ordering = null);
+ // TODO: 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
+ /// Gets descendants of root.
///
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 1c58fc56b8..6feb31115c 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) //todo 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/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs
index a895eff7e1..d32c984b5e 100644
--- a/src/Umbraco.Core/Services/IFileService.cs
+++ b/src/Umbraco.Core/Services/IFileService.cs
@@ -108,6 +108,19 @@ namespace Umbraco.Core.Services
///
void DeleteScriptFolder(string folderPath);
+ ///
+ /// Creates a folder for style sheets
+ ///
+ ///
+ ///
+ void CreateStyleSheetFolder(string folderPath);
+
+ ///
+ /// Deletes a folder for style sheets
+ ///
+ ///
+ void DeleteStyleSheetFolder(string folderPath);
+
///
/// Gets a list of all objects
///
diff --git a/src/Umbraco.Core/Services/Implement/AuditService.cs b/src/Umbraco.Core/Services/Implement/AuditService.cs
index d02d7f541b..46c851a789 100644
--- a/src/Umbraco.Core/Services/Implement/AuditService.cs
+++ b/src/Umbraco.Core/Services/Implement/AuditService.cs
@@ -200,7 +200,7 @@ namespace Umbraco.Core.Services.Implement
return entry;
}
- //TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead
+ // TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead
internal IEnumerable GetAll()
{
if (_isAvailable.Value == false) return Enumerable.Empty();
@@ -211,7 +211,7 @@ namespace Umbraco.Core.Services.Implement
}
}
- //TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead
+ // TODO: Currently used in testing only, not part of the interface, need to add queryable methods to the interface instead
internal IEnumerable GetPage(long pageIndex, int pageCount, out long records)
{
if (_isAvailable.Value == false)
diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs
index e1304a324f..266f34cc37 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)
{
- // todo - 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)
{
- // todo - 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)
{
- // todo - 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)
{
- // todo - 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)
{
- // todo - what about culture?
+ // TODO: what about culture?
if (parent == null) throw new ArgumentNullException(nameof(parent));
@@ -778,7 +778,7 @@ namespace Umbraco.Core.Services.Implement
var culturesChanging = content.ContentType.VariesByCulture()
? content.CultureInfos.Where(x => x.Value.IsDirty()).Select(x => x.Key).ToList()
: null;
- //TODO: Currently there's no way to change track which variant properties have changed, we only have change
+ // TODO: Currently there's no way to change track which variant properties have changed, we only have change
// tracking enabled on all values on the Property which doesn't allow us to know which variants have changed.
// in this particular case, determining which cultures have changed works with the above with names since it will
// have always changed if it's been saved in the back office but that's not really fail safe.
@@ -1562,8 +1562,7 @@ namespace Umbraco.Core.Services.Implement
DoDelete(content);
}
- //TODO:
- // both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way
+ //TODO: both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way
// Delete does - for a good reason: the file may be referenced by other, non-deleted, versions. BUT,
// if that's not the case, then the file will never be deleted, because when we delete the content,
// the version referencing the file will not be there anymore. SO, we can leak files.
@@ -2001,7 +2000,7 @@ namespace Umbraco.Core.Services.Implement
? string.Join(",", content.CultureInfos.Where(x => x.Value.IsDirty()).Select(x => x.Key))
: null;
- //TODO: Currently there's no way to change track which variant properties have changed, we only have change
+ // TODO: Currently there's no way to change track which variant properties have changed, we only have change
// tracking enabled on all values on the Property which doesn't allow us to know which variants have changed.
// in this particular case, determining which cultures have changed works with the above with names since it will
// have always changed if it's been saved in the back office but that's not really fail safe.
@@ -2553,7 +2552,7 @@ namespace Umbraco.Core.Services.Implement
/// Optional Id of the user issuing the delete operation
public void DeleteOfTypes(IEnumerable contentTypeIds, int userId = 0)
{
- //TODO: This currently this is called from the ContentTypeService but that needs to change,
+ // TODO: This currently this is called from the ContentTypeService but that needs to change,
// if we are deleting a content type, we should just delete the data and do this operation slightly differently.
// This method will recursively go lookup every content item, check if any of it's descendants are
// of a different type, move them to the recycle bin, then permanently delete the content items.
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
index a9e75e6f29..bf43693d3b 100644
--- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
+++ b/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
@@ -134,7 +134,7 @@ namespace Umbraco.Core.Services.Implement
var dirty = (IRememberBeingDirty)contentType;
// skip new content types
- //TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly
+ // TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly
var isNewContentType = dirty.WasPropertyDirty("Id");
if (isNewContentType)
{
@@ -152,7 +152,7 @@ namespace Umbraco.Core.Services.Implement
throw new Exception("oops");
// skip new properties
- //TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly
+ // TODO: This used to be WasPropertyDirty("HasIdentity") but i don't think that actually worked for detecting new entities this does seem to work properly
var isNewProperty = dirtyProperty.WasPropertyDirty("Id");
if (isNewProperty) return false;
@@ -353,7 +353,7 @@ namespace Umbraco.Core.Services.Implement
public IEnumerable GetComposedOf(int id)
{
// GetAll is cheap, repository has a full dataset cache policy
- // todo - 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);
}
@@ -758,7 +758,7 @@ namespace Umbraco.Core.Services.Implement
saveEventArgs.CanCancel = false;
OnSavedContainer(scope, saveEventArgs);
- //TODO: Audit trail ?
+ // TODO: Audit trail ?
return OperationResult.Attempt.Succeed(evtMsgs, container);
}
@@ -805,7 +805,7 @@ namespace Umbraco.Core.Services.Implement
OnSavedContainer(scope, args);
}
- //TODO: Audit trail ?
+ // TODO: Audit trail ?
return OperationResult.Attempt.Succeed(evtMsgs);
}
@@ -897,7 +897,7 @@ namespace Umbraco.Core.Services.Implement
OnDeletedContainer(scope, deleteEventArgs);
return OperationResult.Attempt.Succeed(evtMsgs);
- //TODO: Audit trail ?
+ // TODO: Audit trail ?
}
}
diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Core/Services/Implement/DataTypeService.cs
index b97c3a3ee7..97368e9047 100644
--- a/src/Umbraco.Core/Services/Implement/DataTypeService.cs
+++ b/src/Umbraco.Core/Services/Implement/DataTypeService.cs
@@ -62,7 +62,7 @@ namespace Umbraco.Core.Services.Implement
scope.Complete();
scope.Events.Dispatch(SavedContainer, this, new SaveEventArgs(container, evtMsgs));
- //TODO: Audit trail ?
+ // TODO: Audit trail ?
return OperationResult.Attempt.Succeed(evtMsgs, container);
}
@@ -149,7 +149,7 @@ namespace Umbraco.Core.Services.Implement
scope.Complete();
}
- //TODO: Audit trail ?
+ // TODO: Audit trail ?
return OperationResult.Attempt.Succeed(evtMsgs);
}
@@ -182,7 +182,7 @@ namespace Umbraco.Core.Services.Implement
scope.Complete();
}
- //TODO: Audit trail ?
+ // TODO: Audit trail ?
return OperationResult.Attempt.Succeed(evtMsgs);
}
@@ -204,7 +204,7 @@ namespace Umbraco.Core.Services.Implement
_dataTypeContainerRepository.Save(container);
scope.Complete();
- // todo - 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(); // todo 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
- // todo - media and members?!
- // todo - 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 ee6bdeb46d..00edde48f3 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);
- //todo - 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 6b52dd4ac1..6a8514f0a0 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) //todo 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 da82d38e36..f49395d73d 100644
--- a/src/Umbraco.Core/Services/Implement/FileService.cs
+++ b/src/Umbraco.Core/Services/Implement/FileService.cs
@@ -140,6 +140,24 @@ namespace Umbraco.Core.Services.Implement
}
}
+ public void CreateStyleSheetFolder(string folderPath)
+ {
+ using (var scope = ScopeProvider.CreateScope())
+ {
+ ((StylesheetRepository) _stylesheetRepository).AddFolder(folderPath);
+ scope.Complete();
+ }
+ }
+
+ public void DeleteStyleSheetFolder(string folderPath)
+ {
+ using (var scope = ScopeProvider.CreateScope())
+ {
+ ((StylesheetRepository) _stylesheetRepository).DeleteFolder(folderPath);
+ scope.Complete();
+ }
+ }
+
public Stream GetStylesheetFileContentStream(string filepath)
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
@@ -331,7 +349,7 @@ namespace Umbraco.Core.Services.Implement
var evtMsgs = EventMessagesFactory.Get();
- //todo: 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
@@ -1021,7 +1039,7 @@ namespace Umbraco.Core.Services.Implement
_auditRepository.Save(new AuditItem(objectId, type, userId, entityType));
}
- //TODO Method to change name and/or alias of view template
+ // TODO: Method to change name and/or alias of view template
#region Event Handlers
diff --git a/src/Umbraco.Core/Services/Implement/KeyValueService.cs b/src/Umbraco.Core/Services/Implement/KeyValueService.cs
index b30543ed48..eb68cea25c 100644
--- a/src/Umbraco.Core/Services/Implement/KeyValueService.cs
+++ b/src/Umbraco.Core/Services/Implement/KeyValueService.cs
@@ -40,7 +40,7 @@ namespace Umbraco.Core.Services.Implement
// if already running 8, either following an upgrade or an install,
// then everything should be ok (the table should exist, etc)
- if (UmbracoVersion.LocalVersion.Major >= 8)
+ if (UmbracoVersion.LocalVersion != null && UmbracoVersion.LocalVersion.Major >= 8)
return;
// else we are upgrading from 7, we can assume that the locks table
diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs
index 9401cefa7d..4f5121def7 100644
--- a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs
+++ b/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs
@@ -8,7 +8,7 @@ using Umbraco.Core.Logging;
namespace Umbraco.Core.Services.Implement
{
- //TODO: Convert all of this over to Niels K's localization framework one day
+ // TODO: Convert all of this over to Niels K's localization framework one day
public class LocalizedTextService : ILocalizedTextService
{
@@ -58,7 +58,7 @@ namespace Umbraco.Core.Services.Implement
{
if (culture == null) throw new ArgumentNullException(nameof(culture));
- //TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode
+ // TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode
culture = ConvertToSupportedCultureWithRegionCode(culture);
//This is what the legacy ui service did
@@ -91,7 +91,7 @@ namespace Umbraco.Core.Services.Implement
{
if (culture == null) throw new ArgumentNullException("culture");
- //TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode
+ // TODO: Hack, see notes on ConvertToSupportedCultureWithRegionCode
culture = ConvertToSupportedCultureWithRegionCode(culture);
var result = new Dictionary();
diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
index f19dd9f63e..a0b952a75a 100644
--- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
+++ b/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
@@ -21,7 +21,7 @@ namespace Umbraco.Core.Services.Implement
private readonly IEnumerable _supplementFileSources;
private readonly DirectoryInfo _fileSourceFolder;
- //TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :(
+ // TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :(
private readonly Dictionary _twoLetterCultureConverter = new Dictionary();
private readonly Lazy>> _xmlSources;
@@ -60,7 +60,7 @@ namespace Umbraco.Core.Services.Implement
var localCopy = fileInfo;
var filename = Path.GetFileNameWithoutExtension(localCopy.FullName).Replace("_", "-");
- //TODO: Fix this nonsense... would have to wait until v8 to store the language files with their correct
+ // TODO: Fix this nonsense... would have to wait until v8 to store the language files with their correct
// names instead of storing them as 2 letters but actually having a 4 letter culture. wtf. So now, we
// need to check if the file is 2 letters, then open it to try to find it's 4 letter culture, then use that
// if it's successful. We're going to assume (though it seems assuming in the legacy logic is never a great idea)
@@ -150,7 +150,7 @@ namespace Umbraco.Core.Services.Implement
return _xmlSources.Value;
}
- //TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :(
+ // TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :(
public Attempt TryConvert2LetterCultureTo4Letter(string twoLetterCulture)
{
if (twoLetterCulture.Length != 2) return Attempt.Fail();
@@ -163,7 +163,7 @@ namespace Umbraco.Core.Services.Implement
: Attempt.Fail();
}
- //TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :(
+ // TODO: See other notes in this class, this is purely a hack because we store 2 letter culture file names that contain 4 letter cultures :(
public Attempt TryConvert4LetterCultureTo2Letter(CultureInfo culture)
{
if (culture == null) throw new ArgumentNullException("culture");
diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Core/Services/Implement/MediaService.cs
index 357352c182..e7a42e28e4 100644
--- a/src/Umbraco.Core/Services/Implement/MediaService.cs
+++ b/src/Umbraco.Core/Services/Implement/MediaService.cs
@@ -773,8 +773,7 @@ namespace Umbraco.Core.Services.Implement
DoDelete(media);
}
- //TODO:
- // both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way
+ //TODO: both DeleteVersions methods below have an issue. Sort of. They do NOT take care of files the way
// Delete does - for a good reason: the file may be referenced by other, non-deleted, versions. BUT,
// if that's not the case, then the file will never be deleted, because when we delete the media,
// the version referencing the file will not be there anymore. SO, we can leak files.
@@ -882,7 +881,7 @@ namespace Umbraco.Core.Services.Implement
{
scope.WriteLock(Constants.Locks.MediaTree);
- // todo - 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;
@@ -1031,7 +1030,7 @@ namespace Umbraco.Core.Services.Implement
{
var nodeObjectType = Constants.ObjectTypes.Media;
var deleted = new List();
- var evtMsgs = EventMessagesFactory.Get(); // todo - and then?
+ var evtMsgs = EventMessagesFactory.Get(); // TODO: and then?
using (var scope = ScopeProvider.CreateScope())
{
@@ -1276,7 +1275,7 @@ namespace Umbraco.Core.Services.Implement
/// Optional id of the user deleting the media
public void DeleteMediaOfTypes(IEnumerable mediaTypeIds, int userId = 0)
{
- //TODO: This currently this is called from the ContentTypeService but that needs to change,
+ // TODO: This currently this is called from the ContentTypeService but that needs to change,
// if we are deleting a content type, we should just delete the data and do this operation slightly differently.
// This method will recursively go lookup every content item, check if any of it's descendants are
// of a different type, move them to the recycle bin, then permanently delete the content items.
diff --git a/src/Umbraco.Core/Services/Implement/MemberService.cs b/src/Umbraco.Core/Services/Implement/MemberService.cs
index 5726c43fc7..3b35896769 100644
--- a/src/Umbraco.Core/Services/Implement/MemberService.cs
+++ b/src/Umbraco.Core/Services/Implement/MemberService.cs
@@ -449,7 +449,7 @@ namespace Umbraco.Core.Services.Implement
///
public IMember GetByUsername(string username)
{
- //TODO: Somewhere in here, whether at this level or the repository level, we need to add
+ // TODO: Somewhere in here, whether at this level or the repository level, we need to add
// a caching mechanism since this method is used by all the membership providers and could be
// called quite a bit when dealing with members.
@@ -770,8 +770,8 @@ namespace Umbraco.Core.Services.Implement
throw new ArgumentOutOfRangeException(nameof(matchType)); // causes rollback // causes rollback
}
- //TODO: Since this is by property value, we need a GetByPropertyQuery on the repo!
- //TODO: Since this is by property value, we need a GetByPropertyQuery on the repo!
+ // TODO: Since this is by property value, we need a GetByPropertyQuery on the repo!
+ // TODO: Since this is by property value, we need a GetByPropertyQuery on the repo!
return _memberRepository.Get(query);
}
}
@@ -1304,7 +1304,7 @@ namespace Umbraco.Core.Services.Implement
Id = property.Id,
Alias = property.Alias,
Name = property.PropertyType.Name,
- Value = property.GetValue(), // todo ignoring variants
+ Value = property.GetValue(), // TODO: ignoring variants
CreateDate = property.CreateDate,
UpdateDate = property.UpdateDate
};
@@ -1330,8 +1330,8 @@ namespace Umbraco.Core.Services.Implement
{
scope.WriteLock(Constants.Locks.MemberTree);
- //TODO: What about content that has the contenttype as part of its composition?
- //TODO: What about content that has the contenttype as part of its composition?
+ // TODO: What about content that has the contenttype as part of its composition?
+ // TODO: What about content that has the contenttype as part of its composition?
var query = Query().Where(x => x.ContentTypeId == memberTypeId);
var members = _memberRepository.Get(query).ToArray();
diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Core/Services/Implement/NotificationService.cs
index a4aedec438..d981809364 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)
{
- //todo doesn't take into account variants
+ // TODO: doesn't take into account variants
var newText = p.GetValue() != null ? p.GetValue().ToString() : "";
var oldText = newText;
@@ -394,7 +394,7 @@ namespace Umbraco.Core.Services.Implement
content.Id.ToString(CultureInfo.InvariantCulture),
string.Format("{2}://{0}/{1}",
string.Concat(siteUri.Authority),
- //TODO: RE-enable this so we can have a nice url
+ // TODO: RE-enable this so we can have a nice url
/*umbraco.library.NiceUrl(documentObject.Id))*/
string.Concat(content.Id, ".aspx"),
protocol),
diff --git a/src/Umbraco.Core/Services/Implement/RelationService.cs b/src/Umbraco.Core/Services/Implement/RelationService.cs
index dc9693766f..a316d04f8e 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; // todo - 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 784d18da4e..d7303991b5 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
{
- // todo 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 1a88464231..0ea77dedcc 100644
--- a/src/Umbraco.Core/Services/Implement/UserService.cs
+++ b/src/Umbraco.Core/Services/Implement/UserService.cs
@@ -109,7 +109,7 @@ namespace Umbraco.Core.Services.Implement
{
if (string.IsNullOrWhiteSpace(username)) throw new ArgumentNullOrEmptyException(nameof(username));
- //TODO: PUT lock here!!
+ // TODO: PUT lock here!!
User user;
using (var scope = ScopeProvider.CreateScope())
@@ -200,7 +200,7 @@ namespace Umbraco.Core.Services.Implement
}
catch (DbException)
{
- // todo - 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)
{
- // todo - 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!
@@ -1218,7 +1218,7 @@ namespace Umbraco.Core.Services.Implement
///
public static event TypedEventHandler> DeletedUserGroup;
- //TODO: still don't know if we need this yet unless we start caching permissions, but that also means we'll need another
+ // TODO: still don't know if we need this yet unless we start caching permissions, but that also means we'll need another
// event on the ContentService since there's a method there to modify node permissions too, or we can proxy events if needed.
internal static event TypedEventHandler> UserGroupPermissionsAssigned;
}
diff --git a/src/Umbraco.Core/Services/OperationResult.cs b/src/Umbraco.Core/Services/OperationResult.cs
index f6349a985d..d5cdcd79fc 100644
--- a/src/Umbraco.Core/Services/OperationResult.cs
+++ b/src/Umbraco.Core/Services/OperationResult.cs
@@ -3,8 +3,7 @@ using Umbraco.Core.Events;
namespace Umbraco.Core.Services
{
- // todo
- // no need for Attempt - the operation result SHOULD KNOW if it's a success or a failure!
+ // 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 +118,7 @@ namespace Umbraco.Core.Services
return new OperationResult(OperationResultType.FailedCancelledByEvent, eventMessages);
}
- // todo - 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 8ad24aafb8..918f1c49fa 100644
--- a/src/Umbraco.Core/Services/OperationResultType.cs
+++ b/src/Umbraco.Core/Services/OperationResultType.cs
@@ -38,8 +38,8 @@
///
/// No operation has been executed because it was not needed (eg deleting an item that doesn't exist).
///
- NoOperation = Failed | 6, // todo 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...
+ // 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 418e5c0896..1a2b52f9c9 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 - todo weird
+ FailedPublishNothingToPublish = FailedPublish | 9, // TODO: in ContentService.StrategyCanPublish - weird
///
/// The document could not be published because some mandatory cultures are missing.
diff --git a/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs b/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs
index b326a3cda6..12d2ef9a17 100644
--- a/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs
+++ b/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs
@@ -20,7 +20,7 @@ namespace Umbraco.Core.Strings
/// url per culture.
string GetUrlSegment(IContentBase content, string culture = null);
- //TODO: For the 301 tracking, we need to add another extended interface to this so that
+ // TODO: For the 301 tracking, we need to add another extended interface to this so that
// the RedirectTrackingEventHandler can ask the IUrlSegmentProvider if the URL is changing.
// Currently the way it works is very hacky, see notes in: RedirectTrackingEventHandler.ContentService_Publishing
}
diff --git a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs
index f5b4a1cff3..91dd5a7597 100644
--- a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs
+++ b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs
@@ -3337,8 +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
- // todo
- // transliterates Анастасия as Anastasiya, and not Anastasia
+ // 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 d2b7903343..a10c967866 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.
///
- // todo 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 a34644e6a1..741cc2bab1 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.
//
- // todo 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/Sync/IServerAddress.cs b/src/Umbraco.Core/Sync/IServerAddress.cs
index 42567c67c1..be74b8483f 100644
--- a/src/Umbraco.Core/Sync/IServerAddress.cs
+++ b/src/Umbraco.Core/Sync/IServerAddress.cs
@@ -10,6 +10,6 @@
///
string ServerAddress { get; }
- //TODO : Should probably add things like port, protocol, server name, app id
+ // TODO: Should probably add things like port, protocol, server name, app id
}
}
diff --git a/src/Umbraco.Core/TypeExtensions.cs b/src/Umbraco.Core/TypeExtensions.cs
index 56b2026afb..1582b603d3 100644
--- a/src/Umbraco.Core/TypeExtensions.cs
+++ b/src/Umbraco.Core/TypeExtensions.cs
@@ -55,7 +55,7 @@ namespace Umbraco.Core
? getMember(memberName.ToCleanString(CleanStringType.Ascii | CleanStringType.ConvertCase | CleanStringType.CamelCase))
: getMember(memberName.ToCleanString(CleanStringType.Ascii | CleanStringType.ConvertCase | CleanStringType.PascalCase));
- //TODO: If this still fails then we should get a list of properties from the object and then compare - doing the above without listing
+ // TODO: If this still fails then we should get a list of properties from the object and then compare - doing the above without listing
// all properties will surely be faster than using reflection to get ALL properties first and then query against them.
}
diff --git a/src/Umbraco.Core/UdiEntityType.cs b/src/Umbraco.Core/UdiEntityType.cs
index 07bde1ba93..86197ce6a8 100644
--- a/src/Umbraco.Core/UdiEntityType.cs
+++ b/src/Umbraco.Core/UdiEntityType.cs
@@ -78,7 +78,7 @@ namespace Umbraco.Core
public const string DocumentType = "document-type";
public const string DocumentTypeContainer = "document-type-container";
- //TODO: What is this? This alias is only used for the blue print tree to render the blueprint's document type, it's not a real udi type
+ // TODO: What is this? This alias is only used for the blue print tree to render the blueprint's document type, it's not a real udi type
public const string DocumentTypeBluePrints = "document-type-blueprints";
public const string MediaType = "media-type";
public const string MediaTypeContainer = "media-type-container";
diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj
index 0ff88da2f3..dd9110eea2 100755
--- a/src/Umbraco.Core/Umbraco.Core.csproj
+++ b/src/Umbraco.Core/Umbraco.Core.csproj
@@ -211,26 +211,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -331,6 +311,13 @@
+
+
+
+
+
+
+
@@ -372,7 +359,7 @@
-
+
@@ -392,6 +379,7 @@
+
@@ -529,7 +517,7 @@
-
+
@@ -564,7 +552,6 @@
-
diff --git a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs
index afe9831b72..b31fa6a8df 100644
--- a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs
+++ b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs
@@ -31,7 +31,7 @@ namespace Umbraco.Core.Xml
Func publishedContentExists)
{
- //TODO: This should probably support some of the old syntax and token replacements, currently
+ // TODO: This should probably support some of the old syntax and token replacements, currently
// it does not, there is a ticket raised here about it: http://issues.umbraco.org/issue/U4-6364
// previous tokens were: "$currentPage", "$ancestorOrSelf", "$parentPage" and I believe they were
// allowed 'inline', not just at the beginning... whether or not we want to support that is up
@@ -97,7 +97,7 @@ namespace Umbraco.Core.Xml
});
}
- //TODO: This used to just replace $root with string.Empty BUT, that would never work
+ // TODO: This used to just replace $root with string.Empty BUT, that would never work
// the root is always "/root . Need to confirm with Per why this was string.Empty before!
vars.Add("$root", q => q.Replace("$root", "/root"));
diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs
index c48b91893a..eeb7891726 100644
--- a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs
+++ b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs
@@ -45,7 +45,7 @@ namespace Umbraco.Core.Xml.XPath
///
object Value(int index);
- // TODO implement the following one
+ // TODO: implement the following one
/////
///// Gets the value of a field of the navigable content, for a specified language.
diff --git a/src/Umbraco.Examine/ContentValueSetBuilder.cs b/src/Umbraco.Examine/ContentValueSetBuilder.cs
index a6262c53fc..5e0197765d 100644
--- a/src/Umbraco.Examine/ContentValueSetBuilder.cs
+++ b/src/Umbraco.Examine/ContentValueSetBuilder.cs
@@ -29,7 +29,7 @@ namespace Umbraco.Examine
///
public override IEnumerable GetValueSets(params IContent[] content)
{
- //TODO: There is a lot of boxing going on here and ultimately all values will be boxed by Lucene anyways
+ // TODO: There is a lot of boxing going on here and ultimately all values will be boxed by Lucene anyways
// but I wonder if there's a way to reduce the boxing that we have to do or if it will matter in the end since
// Lucene will do it no matter what? One idea was to create a `FieldValue` struct which would contain `object`, `object[]`, `ValueType` and `ValueType[]`
// references and then each array is an array of `FieldValue[]` and values are assigned accordingly. Not sure if it will make a difference or not.
diff --git a/src/Umbraco.Examine/ExamineExtensions.cs b/src/Umbraco.Examine/ExamineExtensions.cs
index 4fe6c359d7..19171ac6b1 100644
--- a/src/Umbraco.Examine/ExamineExtensions.cs
+++ b/src/Umbraco.Examine/ExamineExtensions.cs
@@ -48,7 +48,7 @@ namespace Umbraco.Examine
internal static bool TryParseLuceneQuery(string query)
{
- //TODO: I'd assume there would be a more strict way to parse the query but not that i can find yet, for now we'll
+ // TODO: I'd assume there would be a more strict way to parse the query but not that i can find yet, for now we'll
// also do this rudimentary check
if (!query.Contains(":"))
return false;
diff --git a/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs
index ee2e75cfad..d6dc1f8c73 100644
--- a/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs
+++ b/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs
@@ -22,7 +22,7 @@ namespace Umbraco.Tests.Benchmarks
{
private static byte[] _initDbBytes;
- // fixme - should run on LocalDb same as NPoco tests!
+ // FIXME: should run on LocalDb same as NPoco tests!
private IUmbracoDatabase GetSqlServerDatabase(ILogger logger)
{
diff --git a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs
index 751767f8e7..bc18b97d47 100644
--- a/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs
+++ b/src/Umbraco.Tests.Benchmarks/XmlPublishedContentInitBenchmarks.cs
@@ -94,6 +94,7 @@ namespace Umbraco.Tests.Benchmarks
Guid key, version;
string name, urlName, writerName, creatorName, docTypeAlias, path;
bool isDraft;
+ bool isPublished;
DateTime createDate, updateDate;
PublishedContentType publishedContentType;
Dictionary properties;
@@ -104,7 +105,7 @@ namespace Umbraco.Tests.Benchmarks
OriginalInitializeNode(_xml10.DocumentElement, false, false,
out id, out key, out template, out sortOrder, out name, out writerName, out urlName,
out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path,
- out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType,
+ out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType,
out properties);
}
@@ -114,7 +115,7 @@ namespace Umbraco.Tests.Benchmarks
OriginalInitializeNode(_xml100.DocumentElement, false, false,
out id, out key, out template, out sortOrder, out name, out writerName, out urlName,
out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path,
- out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType,
+ out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType,
out properties);
}
@@ -124,7 +125,7 @@ namespace Umbraco.Tests.Benchmarks
OriginalInitializeNode(_xml1000.DocumentElement, false, false,
out id, out key, out template, out sortOrder, out name, out writerName, out urlName,
out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path,
- out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType,
+ out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType,
out properties);
}
@@ -134,7 +135,7 @@ namespace Umbraco.Tests.Benchmarks
OriginalInitializeNode(_xml10000.DocumentElement, false, false,
out id, out key, out template, out sortOrder, out name, out writerName, out urlName,
out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path,
- out version, out createDate, out updateDate, out level, out isDraft, out publishedContentType,
+ out version, out createDate, out updateDate, out level, out isDraft, out isPublished, out publishedContentType,
out properties);
}
@@ -164,7 +165,7 @@ namespace Umbraco.Tests.Benchmarks
XmlPublishedContent.InitializeNode(null, _xml1000.DocumentElement, false,
out id, out key, out template, out sortOrder, out name, out writerName, out urlName,
out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path,
- out createDate, out updateDate, out level, out isDraft, out publishedContentType,
+ out createDate, out updateDate, out level, out isDraft,out publishedContentType,
out properties, GetPublishedContentType);
}
@@ -174,7 +175,7 @@ namespace Umbraco.Tests.Benchmarks
XmlPublishedContent.InitializeNode(null, _xml10000.DocumentElement, false,
out id, out key, out template, out sortOrder, out name, out writerName, out urlName,
out creatorName, out creatorId, out writerId, out docTypeAlias, out nodeType, out path,
- out createDate, out updateDate, out level, out isDraft, out publishedContentType,
+ out createDate, out updateDate, out level, out isDraft,out publishedContentType,
out properties, GetPublishedContentType);
}
@@ -182,7 +183,7 @@ namespace Umbraco.Tests.Benchmarks
internal static void OriginalInitializeNode(XmlNode xmlNode, bool legacy, bool isPreviewing,
out int id, out Guid key, out int template, out int sortOrder, out string name, out string writerName, out string urlName,
out string creatorName, out int creatorId, out int writerId, out string docTypeAlias, out int docTypeId, out string path,
- out Guid version, out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft,
+ out Guid version, out DateTime createDate, out DateTime updateDate, out int level, out bool isDraft, out bool isPublished,
out PublishedContentType contentType, out Dictionary properties)
{
//initialize the out params with defaults:
@@ -193,6 +194,7 @@ namespace Umbraco.Tests.Benchmarks
name = writerName = urlName = creatorName = docTypeAlias = path = null;
createDate = updateDate = default(DateTime);
isDraft = false;
+ isPublished = true;
contentType = null;
properties = null;
diff --git a/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs b/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs
index 3532a11c63..e9448bd0fc 100644
--- a/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs
+++ b/src/Umbraco.Tests/Cache/DistributedCacheBinderTests.cs
@@ -32,7 +32,7 @@ namespace Umbraco.Tests.Cache
[Test]
public void Can_Find_All_Event_Handlers()
{
- // fixme - cannot work with mocks
+ // FIXME: cannot work with mocks
// because the events are defined on actual static classes, not on the interfaces, so name matching fails
// we should really refactor events entirely - in the meantime, let it be an UmbracoTestBase ;(
//var testObjects = new TestObjects(null);
diff --git a/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs b/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs
index f40ca3f500..0431e7d69f 100644
--- a/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs
+++ b/src/Umbraco.Tests/Clr/ReflectionUtilitiesTests.cs
@@ -309,7 +309,7 @@ namespace Umbraco.Tests.Clr
setterInt4(object4, 42);
Assert.AreEqual(42, object4.IntValue);
- // fixme the code below runs fine with ReSharper test running within VisualStudio
+ // FIXME: the code below runs fine with ReSharper test running within VisualStudio
// but it crashes when running via vstest.console.exe - unless some settings are required?
// converting works
@@ -552,7 +552,7 @@ namespace Umbraco.Tests.Clr
Assert.AreEqual(44, getter3(c));
}
- // fixme - missing tests specifying 'returned' on method, property
+ // FIXME: missing tests specifying 'returned' on method, property
[Test]
public void DeconstructAnonymousType()
diff --git a/src/Umbraco.Tests/Components/ComponentTests.cs b/src/Umbraco.Tests/Components/ComponentTests.cs
index a04636f919..390bb018da 100644
--- a/src/Umbraco.Tests/Components/ComponentTests.cs
+++ b/src/Umbraco.Tests/Components/ComponentTests.cs
@@ -23,7 +23,7 @@ namespace Umbraco.Tests.Components
private static IFactory MockFactory(Action> setup = null)
{
- // fixme use IUmbracoDatabaseFactory vs UmbracoDatabaseFactory, clean it all up!
+ // FIXME: use IUmbracoDatabaseFactory vs UmbracoDatabaseFactory, clean it all up!
var mock = new Mock();
@@ -444,7 +444,7 @@ namespace Umbraco.Tests.Components
#region TypeArray
- // fixme - move to Testing
+ // FIXME: move to Testing
private static Type[] TypeArray()
{
diff --git a/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs b/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs
index 4c262fbf82..8ea13fc920 100644
--- a/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs
+++ b/src/Umbraco.Tests/Composing/CollectionBuildersTests.cs
@@ -453,7 +453,7 @@ namespace Umbraco.Tests.Composing
public class Resolved1 : Resolved
{ }
- [Weight(5)] // default is 10
+ [Weight(50)] // default is 100
public class Resolved2 : Resolved
{ }
diff --git a/src/Umbraco.Tests/Composing/ContainerConformingTests.cs b/src/Umbraco.Tests/Composing/ContainerConformingTests.cs
index 21ea961636..86226b82e7 100644
--- a/src/Umbraco.Tests/Composing/ContainerConformingTests.cs
+++ b/src/Umbraco.Tests/Composing/ContainerConformingTests.cs
@@ -143,12 +143,11 @@ namespace Umbraco.Tests.Composing
}
[Test]
- public void SingletonServiceIsUnique() // fixme - but what is LightInject actually doing
+ public void SingletonServiceIsUnique() // FIXME: but what is LightInject actually doing
{
var register = GetRegister();
- // fixme
- // LightInject is 'unique' per serviceType+serviceName
+ // FIXME: LightInject is 'unique' per serviceType+serviceName
// but that's not how all containers work
// and we should not rely on it
// if we need unique, use RegisterUnique
diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config b/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config
deleted file mode 100644
index 4c86355a1b..0000000000
--- a/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
-
-
- settings
-
-
-
- views/dashboard/settings/settingsdashboardintro.html
-
-
- views/dashboard/settings/settingsdashboardvideos.html
-
-
-
- dashboard/ExamineManagement.ascx
-
-
-
-
-
- developer
-
-
-
- views/dashboard/developer/developerdashboardintro.html
-
-
- views/dashboard/developer/developerdashboardvideos.html
-
-
-
-
-
-
- media
-
-
-
- views/dashboard/media/mediafolderbrowser.html
-
-
-
-
- admin
-
-
- views/dashboard/media/mediadashboardintro.html
-
-
- views/dashboard/media/desktopmediauploader.html
-
-
- views/dashboard/media/mediadashboardvideos.html
-
-
-
-
-
-
- translator
- hello
- world
-
-
- content
-
-
-
- admin
-
-
- views/dashboard/default/startupdashboardintro.html
-
-
- views/dashboard/default/startupdashboardkits.html
-
- editor
- writer
-
-
-
- views/dashboard/default/startupdashboardvideos.html
-
-
-
- dashboard/latestEdits.ascx
-
-
-
- views/dashboard/changepassword.html
-
-
-
-
-
-
- default
- member
-
-
-
- views/dashboard/members/membersdashboardintro.html
-
-
- members/membersearch.ascx
-
-
- views/dashboard/members/membersdashboardvideos.html
-
-
-
-
diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs b/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs
deleted file mode 100644
index 920de683b4..0000000000
--- a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-using System.Configuration;
-using System.IO;
-using System.Linq;
-using NUnit.Framework;
-using Umbraco.Core.Configuration.Dashboard;
-using Umbraco.Core.Configuration.UmbracoSettings;
-using Umbraco.Tests.TestHelpers;
-
-namespace Umbraco.Tests.Configurations.DashboardSettings
-{
- [TestFixture]
- public class DashboardSettingsTests
- {
- [SetUp]
- public void Init()
- {
- var config = new FileInfo(TestHelper.MapPathForTest("~/Configurations/DashboardSettings/web.config"));
-
- var fileMap = new ExeConfigurationFileMap() { ExeConfigFilename = config.FullName };
- var configuration = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
-
- SettingsSection = configuration.GetSection("umbracoConfiguration/dashBoard") as DashboardSection;
-
- Assert.IsNotNull(SettingsSection);
- }
-
- protected IDashboardSection SettingsSection { get; private set; }
-
- [Test]
- public void Test_Sections()
- {
- Assert.AreEqual(5, SettingsSection.Sections.Count());
-
- Assert.AreEqual("StartupSettingsDashboardSection", SettingsSection.Sections.ElementAt(0).Alias);
- Assert.AreEqual("StartupDeveloperDashboardSection", SettingsSection.Sections.ElementAt(1).Alias);
- Assert.AreEqual("StartupMediaDashboardSection", SettingsSection.Sections.ElementAt(2).Alias);
- Assert.AreEqual("StartupDashboardSection", SettingsSection.Sections.ElementAt(3).Alias);
- Assert.AreEqual("StartupMemberDashboardSection", SettingsSection.Sections.ElementAt(4).Alias);
- }
-
- [Test]
- public void Test_Section_Area()
- {
- Assert.AreEqual("settings", SettingsSection.Sections.ElementAt(0).Areas.First());
- Assert.AreEqual("developer", SettingsSection.Sections.ElementAt(1).Areas.First());
- Assert.AreEqual("media", SettingsSection.Sections.ElementAt(2).Areas.First());
- Assert.AreEqual("content", SettingsSection.Sections.ElementAt(3).Areas.First());
- Assert.AreEqual("default", SettingsSection.Sections.ElementAt(4).Areas.First());
- Assert.AreEqual("member", SettingsSection.Sections.ElementAt(4).Areas.Last());
- }
-
- [Test]
- public void Test_Section_Access()
- {
-
- Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.Count());
-
- Assert.AreEqual("translator", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Value);
- Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(0).Type);
- Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Value);
- Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(1).Type);
- Assert.AreEqual("world", SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Value);
- Assert.AreEqual(AccessRuleType.GrantBySection, SettingsSection.Sections.ElementAt(3).AccessRights.Rules.ElementAt(2).Type);
- }
-
- [Test]
- public void Test_Section_Tabs()
- {
- //Element 0 Alias "StartupSettingsDashboardSection"
- Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.Count());
-
- //Element 1 Alias "StartupDeveloperDashboardSection"
- Assert.AreEqual(1, SettingsSection.Sections.ElementAt(1).Tabs.Count());
-
- //Element 2 Alias "StartupMediaDashboardSection"
- Assert.AreEqual(2, SettingsSection.Sections.ElementAt(2).Tabs.Count());
-
- //Element 3 Alias "StartupDashboardSection"
- Assert.AreEqual(3, SettingsSection.Sections.ElementAt(3).Tabs.Count());
-
- //Element 4 Alias "StartupMemberDashboardSection"
- Assert.AreEqual(1, SettingsSection.Sections.ElementAt(4).Tabs.Count());
-
- }
-
- [Test]
- public void Test_Tab()
- {
- Assert.AreEqual("Get Started", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Caption);
- Assert.AreEqual(2, SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.Count());
- }
-
- [Test]
- public void Test_Tab_Access()
- {
- Assert.AreEqual(1, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.Count());
- Assert.AreEqual(AccessRuleType.Grant, SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Type);
- Assert.AreEqual("admin", SettingsSection.Sections.ElementAt(2).Tabs.ElementAt(1).AccessRights.Rules.ElementAt(0).Value);
- }
-
- [Test]
- public void Test_Control()
- {
- Assert.AreEqual("hello", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).PanelCaption);
- Assert.AreEqual("views/dashboard/settings/settingsdashboardintro.html",
- SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(0).ControlPath);
-
- Assert.AreEqual("", SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).PanelCaption);
- Assert.AreEqual("views/dashboard/settings/settingsdashboardvideos.html",
- SettingsSection.Sections.ElementAt(0).Tabs.ElementAt(0).Controls.ElementAt(1).ControlPath);
- }
-
- [Test]
- public void Test_Control_Access()
- {
- Assert.AreEqual(2, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.Count());
- Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Type);
- Assert.AreEqual("editor", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(0).Value);
- Assert.AreEqual(AccessRuleType.Deny, SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Type);
- Assert.AreEqual("writer", SettingsSection.Sections.ElementAt(3).Tabs.ElementAt(0).Controls.ElementAt(1).AccessRights.Rules.ElementAt(1).Value);
- }
- }
-}
diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/web.config b/src/Umbraco.Tests/Configurations/DashboardSettings/web.config
deleted file mode 100644
index 8cf262cbff..0000000000
--- a/src/Umbraco.Tests/Configurations/DashboardSettings/web.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Tests/CoreThings/UdiTests.cs b/src/Umbraco.Tests/CoreThings/UdiTests.cs
index 35080e8c24..c700b78c4b 100644
--- a/src/Umbraco.Tests/CoreThings/UdiTests.cs
+++ b/src/Umbraco.Tests/CoreThings/UdiTests.cs
@@ -22,7 +22,7 @@ namespace Umbraco.Tests.CoreThings
[SetUp]
public void SetUp()
{
- // fixme - bad in a unit test - but Udi has a static ctor that wants it?!
+ // FIXME: bad in a unit test - but Udi has a static ctor that wants it?!
var container = new Mock();
var globalSettings = SettingsForTests.GenerateMockGlobalSettings();
container.Setup(x => x.GetInstance(typeof(TypeLoader))).Returns(
diff --git a/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs b/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs
index 088ef6b54b..1c0b407ac6 100644
--- a/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs
+++ b/src/Umbraco.Tests/FrontEnd/UmbracoHelperTests.cs
@@ -406,7 +406,7 @@ namespace Umbraco.Tests.FrontEnd
private void SetUpDependencyContainer()
{
- // fixme - bad in a unit test - but Udi has a static ctor that wants it?!
+ // FIXME: bad in a unit test - but Udi has a static ctor that wants it?!
var container = new Mock();
var globalSettings = SettingsForTests.GenerateMockGlobalSettings();
diff --git a/src/Umbraco.Tests/IO/FileSystemsTests.cs b/src/Umbraco.Tests/IO/FileSystemsTests.cs
index 52de1bbcfa..1f98fd4443 100644
--- a/src/Umbraco.Tests/IO/FileSystemsTests.cs
+++ b/src/Umbraco.Tests/IO/FileSystemsTests.cs
@@ -122,7 +122,7 @@ namespace Umbraco.Tests.IO
}
- // fixme - don't make sense anymore
+ // FIXME: don't make sense anymore
/*
[Test]
public void Cannot_Get_InvalidFileSystem()
diff --git a/src/Umbraco.Tests/Logging/LogviewerTests.cs b/src/Umbraco.Tests/Logging/LogviewerTests.cs
index 2feac2ae5f..75e2c66a61 100644
--- a/src/Umbraco.Tests/Logging/LogviewerTests.cs
+++ b/src/Umbraco.Tests/Logging/LogviewerTests.cs
@@ -199,7 +199,7 @@ namespace Umbraco.Tests.Logging
Assert.IsNotNull(findItem, "We should have found the saved search, but get no results");
Assert.AreEqual(1, findItem.Count(), "Our list of searches should only contain one result");
- //TODO: Need someone to help me find out why these don't work
+ // TODO: Need someone to help me find out why these don't work
//CollectionAssert.Contains(searches, savedSearch, "Can not find the new search that was saved");
//Assert.That(searches, Contains.Item(savedSearch));
diff --git a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs
index 4e791c0169..6605bc4546 100644
--- a/src/Umbraco.Tests/Manifest/ManifestParserTests.cs
+++ b/src/Umbraco.Tests/Manifest/ManifestParserTests.cs
@@ -7,12 +7,12 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
-using Umbraco.Core.Configuration.Dashboard;
using Umbraco.Core.Logging;
using Umbraco.Core.Manifest;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.Validators;
using Umbraco.Core.Services;
+using Umbraco.Core.Dashboards;
namespace Umbraco.Tests.Manifest
{
@@ -337,12 +337,12 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2
Assert.AreEqual(2, config.Count);
Assert.IsTrue(config.ContainsKey("image"));
var c = config["image"];
- Assert.IsInstanceOf(c); // fixme - is this what we want?
+ Assert.IsInstanceOf(c); // FIXME: is this what we want?
Assert.IsTrue(config.ContainsKey("link"));
c = config["link"];
- Assert.IsInstanceOf(c); // fixme - is this what we want?
+ Assert.IsInstanceOf(c); // FIXME: is this what we want?
- // fixme - should we resolveUrl in configs?
+ // FIXME: should we resolveUrl in configs?
}
[Test]
@@ -387,7 +387,6 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2
{
const string json = @"{'dashboards': [
{
- 'name': 'First One',
'alias': 'something',
'view': '~/App_Plugins/MyPackage/Dashboards/one.html',
'sections': [ 'content' ],
@@ -395,7 +394,6 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2
},
{
- 'name': 'Second-One',
'alias': 'something.else',
'weight': -1,
'view': '~/App_Plugins/MyPackage/Dashboards/two.html',
@@ -406,10 +404,9 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2
var manifest = _parser.ParseManifest(json);
Assert.AreEqual(2, manifest.Dashboards.Length);
- Assert.IsInstanceOf(manifest.Dashboards[0]);
+ Assert.IsInstanceOf(manifest.Dashboards[0]);
var db0 = manifest.Dashboards[0];
Assert.AreEqual("something", db0.Alias);
- Assert.AreEqual("First One", db0.Name);
Assert.AreEqual(100, db0.Weight);
Assert.AreEqual("/App_Plugins/MyPackage/Dashboards/one.html", db0.View);
Assert.AreEqual(1, db0.Sections.Length);
@@ -420,10 +417,9 @@ javascript: ['~/test.js',/*** some note about stuff asd09823-4**09234*/ '~/test2
Assert.AreEqual(AccessRuleType.Deny, db0.AccessRules[1].Type);
Assert.AreEqual("foo", db0.AccessRules[1].Value);
- Assert.IsInstanceOf(manifest.Dashboards[1]);
+ Assert.IsInstanceOf(manifest.Dashboards[1]);
var db1 = manifest.Dashboards[1];
Assert.AreEqual("something.else", db1.Alias);
- Assert.AreEqual("Second-One", db1.Name);
Assert.AreEqual(-1, db1.Weight);
Assert.AreEqual("/App_Plugins/MyPackage/Dashboards/two.html", db1.View);
Assert.AreEqual(1, db1.Sections.Length);
diff --git a/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs b/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs
index f1f46133c3..091ea6f9a0 100644
--- a/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs
+++ b/src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs
@@ -120,8 +120,7 @@ namespace Umbraco.Tests.Membership
Assert.Throws(() => provider.GetPassword("test", "test"));
}
- // fixme
- // in v7 this test relies on ApplicationContext.Current being null, which makes little
+ // FIXME: in v7 this test relies on ApplicationContext.Current being null, which makes little
// sense, not going to port the weird code in MembershipProviderBase.ResetPassword, so
// what shall we do?
[Test]
diff --git a/src/Umbraco.Tests/Misc/UriUtilityTests.cs b/src/Umbraco.Tests/Misc/UriUtilityTests.cs
index 42c69d3967..3dbd54c3a9 100644
--- a/src/Umbraco.Tests/Misc/UriUtilityTests.cs
+++ b/src/Umbraco.Tests/Misc/UriUtilityTests.cs
@@ -7,7 +7,7 @@ using Umbraco.Web;
namespace Umbraco.Tests.Misc
{
- // fixme - not testing virtual directory!
+ // FIXME: not testing virtual directory!
[TestFixture]
public class UriUtilityTests
diff --git a/src/Umbraco.Tests/Models/LightEntityTest.cs b/src/Umbraco.Tests/Models/LightEntityTest.cs
index 1ec9f05822..f1752a7681 100644
--- a/src/Umbraco.Tests/Models/LightEntityTest.cs
+++ b/src/Umbraco.Tests/Models/LightEntityTest.cs
@@ -42,7 +42,7 @@ namespace Umbraco.Tests.Models
var result = ss.ToStream(item);
var json = result.ResultStream.ToJsonString();
- Debug.Print(json); // fixme compare with v7
+ Debug.Print(json); // FIXME: compare with v7
}
}
}
diff --git a/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs b/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs
index b2d1440010..0de416ed72 100644
--- a/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs
+++ b/src/Umbraco.Tests/Models/Mapping/ContentTypeModelMappingTests.cs
@@ -32,7 +32,7 @@ namespace Umbraco.Tests.Models.Mapping
{
base.SetUp();
- // fixme - are we initializing mappers that... have already been?
+ // FIXME: are we initializing mappers that... have already been?
Mapper.Reset();
Mapper.Initialize(configuration =>
{
@@ -97,7 +97,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(display.CreateDate, result.CreateDate);
Assert.AreEqual(display.UpdateDate, result.UpdateDate);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(display.Groups.Count(), result.PropertyGroups.Count);
for (var i = 0; i < display.Groups.Count(); i++)
{
@@ -157,7 +157,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(display.CreateDate, result.CreateDate);
Assert.AreEqual(display.UpdateDate, result.UpdateDate);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(display.Groups.Count(), result.PropertyGroups.Count);
for (var i = 0; i < display.Groups.Count(); i++)
{
@@ -221,7 +221,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(display.CreateDate, result.CreateDate);
Assert.AreEqual(display.UpdateDate, result.UpdateDate);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(display.Groups.Count(), result.PropertyGroups.Count);
for (var i = 0; i < display.Groups.Count(); i++)
{
@@ -276,7 +276,7 @@ namespace Umbraco.Tests.Models.Mapping
//Assert
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(display.Groups.Count(x => x.Inherited == false), result.PropertyGroups.Count);
}
@@ -303,7 +303,7 @@ namespace Umbraco.Tests.Models.Mapping
//Assert
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(display.Groups.Count(x => x.Inherited == false), result.PropertyGroups.Count);
}
@@ -337,7 +337,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(memberType.CreateDate, result.CreateDate);
Assert.AreEqual(memberType.UpdateDate, result.UpdateDate);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(memberType.PropertyGroups.Count(), result.Groups.Count());
for (var i = 0; i < memberType.PropertyGroups.Count(); i++)
@@ -393,7 +393,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(mediaType.CreateDate, result.CreateDate);
Assert.AreEqual(mediaType.UpdateDate, result.UpdateDate);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(mediaType.PropertyGroups.Count(), result.Groups.Count());
for (var i = 0; i < mediaType.PropertyGroups.Count(); i++)
@@ -447,7 +447,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(contentType.UpdateDate, result.UpdateDate);
Assert.AreEqual(contentType.DefaultTemplate.Alias, result.DefaultTemplate.Alias);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(contentType.PropertyGroups.Count, result.Groups.Count());
for (var i = 0; i < contentType.PropertyGroups.Count; i++)
@@ -748,7 +748,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(contentType.CreateDate, result.CreateDate);
Assert.AreEqual(contentType.UpdateDate, result.UpdateDate);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(contentType.CompositionPropertyGroups.Select(x => x.Name).Distinct().Count(), result.Groups.Count(x => x.IsGenericProperties == false));
Assert.AreEqual(1, result.Groups.Count(x => x.IsGenericProperties));
@@ -830,7 +830,7 @@ namespace Umbraco.Tests.Models.Mapping
Assert.AreEqual(contentType.UpdateDate, result.UpdateDate);
Assert.AreEqual(contentType.DefaultTemplate.Alias, result.DefaultTemplate.Alias);
- //TODO: Now we need to assert all of the more complicated parts
+ // TODO: Now we need to assert all of the more complicated parts
Assert.AreEqual(contentType.CompositionPropertyGroups.Select(x => x.Name).Distinct().Count(), result.Groups.Count(x => x.IsGenericProperties == false));
Assert.AreEqual(1, result.Groups.Count(x => x.IsGenericProperties));
diff --git a/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs b/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs
index f1dea9b587..bdab736cd1 100644
--- a/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs
+++ b/src/Umbraco.Tests/Models/Mapping/UserModelMapperTests.cs
@@ -28,7 +28,7 @@ namespace Umbraco.Tests.Models.Mapping
var userGroupSave = JsonConvert.DeserializeObject(json.Replace("@@@ID@@@", userGroup.Id.ToString()));
// failed, AutoMapper complained, "Unable to cast object of type 'WhereSelectArrayIterator`2[System.Char,System.String]' to type 'System.Collections.IList'".
- // fixmed: added ToList() in UserGroupFactory
+ // FIXME: added ToList() in UserGroupFactory
Mapper.Map(userGroupSave, userGroup);
}
}
diff --git a/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs b/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs
index 010572abec..df4071281c 100644
--- a/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs
+++ b/src/Umbraco.Tests/Packaging/CreatedPackagesRepositoryTests.cs
@@ -137,7 +137,7 @@ namespace Umbraco.Tests.Packaging
def = PackageBuilder.GetById(def.Id);
Assert.AreEqual("updated", def.Name);
Assert.AreEqual(2, def.Files.Count);
- //TODO: There's a whole lot more assertions to be done
+ // TODO: There's a whole lot more assertions to be done
}
@@ -191,7 +191,7 @@ namespace Umbraco.Tests.Packaging
Assert.AreEqual("", xml.Element("umbPackage").Element("Actions").ToString(SaveOptions.DisableFormatting));
- //TODO: There's a whole lot more assertions to be done
+ // TODO: There's a whole lot more assertions to be done
}
}
}
diff --git a/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs b/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs
index 4256a66a2d..731ce73d3d 100644
--- a/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs
+++ b/src/Umbraco.Tests/Packaging/PackageInstallationTest.cs
@@ -126,7 +126,7 @@ namespace Umbraco.Tests.Packaging
Assert.AreEqual(1, preInstallWarnings.FilesReplaced.Count());
Assert.AreEqual("bin\\Auros.DocumentTypePicker.dll", preInstallWarnings.FilesReplaced.First());
- //TODO: More Asserts
+ // TODO: More Asserts
}
[Test]
diff --git a/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs b/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs
index 32689fe192..c276dc35ca 100644
--- a/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs
+++ b/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs
@@ -54,7 +54,7 @@ namespace Umbraco.Tests.Persistence
}
[Test]
- public void CreateDatabase() // fixme - move to DatabaseBuilderTest!
+ public void CreateDatabase() // FIXME: move to DatabaseBuilderTest!
{
var path = TestHelper.CurrentAssemblyDirectory;
AppDomain.CurrentDomain.SetData("DataDirectory", path);
diff --git a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs
index 3503318888..2a6c1f4e12 100644
--- a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs
+++ b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoBulkInsertTests.cs
@@ -12,7 +12,7 @@ using Umbraco.Tests.Testing;
namespace Umbraco.Tests.Persistence.NPocoTests
{
- // fixme.npoco - is this still appropriate?
+ // FIXME: npoco - is this still appropriate?
//
[TestFixture]
[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)]
diff --git a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs
index 64bc825c3e..9ee50d1230 100644
--- a/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs
+++ b/src/Umbraco.Tests/Persistence/NPocoTests/NPocoFetchTests.cs
@@ -370,7 +370,7 @@ namespace Umbraco.Tests.Persistence.NPocoTests
var sql = scope.SqlContext.Sql()
.Select()
- .Append(", COUNT(zbThing2Group.groupId) AS groupCount") // fixme
+ .Append(", COUNT(zbThing2Group.groupId) AS groupCount") // FIXME:
.From()
.InnerJoin().On((t, t2g) => t.Id == t2g.ThingId)
.GroupBy(x => x.Id, x => x.Name);
diff --git a/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs b/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs
index db3b02bacf..f558a64499 100644
--- a/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs
+++ b/src/Umbraco.Tests/Persistence/NPocoTests/PetaPocoCachesTest.cs
@@ -15,7 +15,7 @@ using Umbraco.Tests.Testing;
namespace Umbraco.Tests.Persistence.NPocoTests
{
- // fixme.npoco - what shall we do with those tests?
+ // FIXME: npoco - what shall we do with those tests?
//
[TestFixture, Ignore("fixme - ignored test")]
[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)]
diff --git a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs
index 03701dd3b5..96809c7bf6 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs
@@ -59,7 +59,7 @@ namespace Umbraco.Tests.Persistence.Repositories
return new EntityContainerRepository(scopeAccessor, AppCaches.Disabled, Logger, containerEntityType);
}
- //TODO Add test to verify SetDefaultTemplates updates both AllowedTemplates and DefaultTemplate(id).
+ // TODO: Add test to verify SetDefaultTemplates updates both AllowedTemplates and DefaultTemplate(id).
[Test]
public void Maps_Templates_Correctly()
diff --git a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs
index b7f354a2fb..b140aa078e 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/PublicAccessRepositoryTest.cs
@@ -230,7 +230,7 @@ namespace Umbraco.Tests.Persistence.Repositories
//now remove a few rules from a few of the items and then add some more, this will put things 'out of order' which
//we need to verify our sort order is working for the relator
- // fixme - no "relator" in v8?!
+ // FIXME: no "relator" in v8?!
for (int i = 0; i < allEntries.Count; i++)
{
//all the even ones
diff --git a/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs b/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs
index 66f6655c77..652209b65b 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/RedirectUrlRepositoryTests.cs
@@ -73,7 +73,7 @@ namespace Umbraco.Tests.Persistence.Repositories
Assert.AreNotEqual(0, rurl.Id);
- // fixme - too fast = same date = key violation?
+ // FIXME: too fast = same date = key violation?
// and... can that happen in real life?
// we don't really *care* about the IX, only supposed to make things faster...
// BUT in realife we AddOrUpdate in a trx so it should be safe, always
@@ -119,7 +119,7 @@ namespace Umbraco.Tests.Persistence.Repositories
Assert.AreNotEqual(0, rurl.Id);
- // fixme - goes too fast and bam, errors, first is blah
+ // FIXME: goes too fast and bam, errors, first is blah
rurl = new RedirectUrl
{
diff --git a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs
index b927d23740..6acd63b2b3 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/TagRepositoryTest.cs
@@ -454,7 +454,7 @@ namespace Umbraco.Tests.Persistence.Repositories
contentType.PropertyTypes.First().Id,
tags, false);
- //TODO: This would be nice to be able to map the ids back but unfortunately we are not doing this
+ // TODO: This would be nice to be able to map the ids back but unfortunately we are not doing this
//var result = repository.GetAll(new[] {tags[0].Id, tags[1].Id, tags[2].Id});
var all = repository.GetMany().ToArray();
diff --git a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
index 4ee6ecf9e3..779ec45a35 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
@@ -234,8 +234,7 @@ namespace Umbraco.Tests.Persistence.Repositories
// Act
var updatedItem = repository.Get(user.Id);
- // fixme
- // this test cannot work, user has 2 sections but the way it's created,
+ // FIXME: this test cannot work, user has 2 sections but the way it's created,
// they don't show, so the comparison with updatedItem fails - fix!
// Assert
diff --git a/src/Umbraco.Tests/Published/NestedContentTests.cs b/src/Umbraco.Tests/Published/NestedContentTests.cs
index 375fb5ee0f..8f3b9a1df9 100644
--- a/src/Umbraco.Tests/Published/NestedContentTests.cs
+++ b/src/Umbraco.Tests/Published/NestedContentTests.cs
@@ -263,6 +263,7 @@ namespace Umbraco.Tests.Published
// ReSharper disable UnassignedGetOnlyAutoProperty
public override PublishedItemType ItemType { get; }
public override bool IsDraft(string culture = null) => false;
+ public override bool IsPublished(string culture = null) => true;
public override IPublishedContent Parent { get; }
public override IEnumerable Children { get; }
public override PublishedContentType ContentType { get; }
diff --git a/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs b/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs
index 9130161d3a..4f18320fe8 100644
--- a/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs
+++ b/src/Umbraco.Tests/PublishedContent/NuCacheTests.cs
@@ -20,6 +20,7 @@ using Umbraco.Tests.Testing.Objects;
using Umbraco.Tests.Testing.Objects.Accessors;
using Umbraco.Web;
using Umbraco.Web.Cache;
+using Umbraco.Web.PublishedCache;
using Umbraco.Web.PublishedCache.NuCache;
using Umbraco.Web.PublishedCache.NuCache.DataSource;
using Umbraco.Web.Routing;
@@ -29,12 +30,13 @@ namespace Umbraco.Tests.PublishedContent
[TestFixture]
public class NuCacheTests
{
- [Test]
- public void StandaloneVariations()
- {
- // this test implements a full standalone NuCache (based upon a test IDataSource, does not
- // use any local db files, does not rely on any database) - and tests variations
+ private IPublishedSnapshotService _snapshotService;
+ private IVariationContextAccessor _variationAccesor;
+ private ContentType _contentType;
+ private PropertyType _propertyType;
+ private void Init()
+ {
Current.Reset();
Current.UnlockConfigs();
Current.Configs.Add(SettingsForTests.GenerateMockUmbracoSettings);
@@ -46,20 +48,39 @@ namespace Umbraco.Tests.PublishedContent
{
ContentTypeId = 2,
Node = new ContentNode(1, Guid.NewGuid(), 0, "-1,1", 0, -1, DateTime.Now, 0),
- DraftData = new ContentData { Name="It Works2!", Published = false, TemplateId = 0, VersionId = 2, VersionDate = DateTime.Now, WriterId = 0,
+ DraftData = new ContentData
+ {
+ Name = "It Works2!",
+ Published = false,
+ TemplateId = 0,
+ VersionId = 2,
+ VersionDate = DateTime.Now,
+ WriterId = 0,
Properties = new Dictionary { { "prop", new[]
{
new PropertyData { Culture = "", Segment = "", Value = "val2" },
new PropertyData { Culture = "fr-FR", Segment = "", Value = "val-fr2" },
- new PropertyData { Culture = "en-UK", Segment = "", Value = "val-uk2" }
+ new PropertyData { Culture = "en-UK", Segment = "", Value = "val-uk2" },
+ new PropertyData { Culture = "dk-DA", Segment = "", Value = "val-da2" },
+ new PropertyData { Culture = "de-DE", Segment = "", Value = "val-de2" }
} } },
CultureInfos = new Dictionary
{
- { "fr-FR", new CultureVariation { Name = "name-fr2", Date = new DateTime(2018, 01, 03, 01, 00, 00) } },
- { "en-UK", new CultureVariation { Name = "name-uk2", Date = new DateTime(2018, 01, 04, 01, 00, 00) } }
+ // draft data = everything, and IsDraft indicates what's edited
+ { "fr-FR", new CultureVariation { Name = "name-fr2", IsDraft = true, Date = new DateTime(2018, 01, 03, 01, 00, 00) } },
+ { "en-UK", new CultureVariation { Name = "name-uk2", IsDraft = true, Date = new DateTime(2018, 01, 04, 01, 00, 00) } },
+ { "dk-DA", new CultureVariation { Name = "name-da2", IsDraft = true, Date = new DateTime(2018, 01, 05, 01, 00, 00) } },
+ { "de-DE", new CultureVariation { Name = "name-de1", IsDraft = false, Date = new DateTime(2018, 01, 02, 01, 00, 00) } }
}
},
- PublishedData = new ContentData { Name="It Works1!", Published = true, TemplateId = 0, VersionId = 1, VersionDate = DateTime.Now, WriterId = 0,
+ PublishedData = new ContentData
+ {
+ Name = "It Works1!",
+ Published = true,
+ TemplateId = 0,
+ VersionId = 1,
+ VersionDate = DateTime.Now,
+ WriterId = 0,
Properties = new Dictionary { { "prop", new[]
{
new PropertyData { Culture = "", Segment = "", Value = "val1" },
@@ -68,8 +89,10 @@ namespace Umbraco.Tests.PublishedContent
} } },
CultureInfos = new Dictionary
{
- { "fr-FR", new CultureVariation { Name = "name-fr1", Date = new DateTime(2018, 01, 01, 01, 00, 00) } },
- { "en-UK", new CultureVariation { Name = "name-uk1", Date = new DateTime(2018, 01, 02, 01, 00, 00) } }
+ // published data = only what's actually published, and IsDraft has to be false
+ { "fr-FR", new CultureVariation { Name = "name-fr1", IsDraft = false, Date = new DateTime(2018, 01, 01, 01, 00, 00) } },
+ { "en-UK", new CultureVariation { Name = "name-uk1", IsDraft = false, Date = new DateTime(2018, 01, 02, 01, 00, 00) } },
+ { "de-DE", new CultureVariation { Name = "name-de1", IsDraft = false, Date = new DateTime(2018, 01, 02, 01, 00, 00) } }
}
}
};
@@ -88,13 +111,13 @@ namespace Umbraco.Tests.PublishedContent
dataType
};
- var propertyType = new PropertyType("Umbraco.Void.Editor", ValueStorageType.Nvarchar) { Alias = "prop", DataTypeId = 3, Variations = ContentVariation.Culture };
- var contentType = new ContentType(-1) { Id = 2, Alias = "alias-ct", Variations = ContentVariation.Culture };
- contentType.AddPropertyType(propertyType);
+ _propertyType = new PropertyType("Umbraco.Void.Editor", ValueStorageType.Nvarchar) { Alias = "prop", DataTypeId = 3, Variations = ContentVariation.Culture };
+ _contentType = new ContentType(-1) { Id = 2, Alias = "alias-ct", Variations = ContentVariation.Culture };
+ _contentType.AddPropertyType(_propertyType);
var contentTypes = new[]
{
- contentType
+ _contentType
};
var contentTypeService = Mock.Of();
@@ -106,10 +129,10 @@ namespace Umbraco.Tests.PublishedContent
// create a service context
var serviceContext = ServiceContext.CreatePartial(
- dataTypeService : dataTypeService,
+ dataTypeService: dataTypeService,
memberTypeService: Mock.Of(),
memberService: Mock.Of(),
- contentTypeService : contentTypeService,
+ contentTypeService: contentTypeService,
localizationService: Mock.Of()
);
@@ -132,18 +155,18 @@ namespace Umbraco.Tests.PublishedContent
dataTypeService);
// create a variation accessor
- var variationAccessor = new TestVariationContextAccessor();
+ _variationAccesor = new TestVariationContextAccessor();
// at last, create the complete NuCache snapshot service!
var options = new PublishedSnapshotService.Options { IgnoreLocalDb = true };
- var snapshotService = new PublishedSnapshotService(options,
+ _snapshotService = new PublishedSnapshotService(options,
null,
runtime,
serviceContext,
contentTypeFactory,
null,
new TestPublishedSnapshotAccessor(),
- variationAccessor,
+ _variationAccesor,
Mock.Of(),
Mock.Of(),
scopeProvider,
@@ -156,12 +179,21 @@ namespace Umbraco.Tests.PublishedContent
new SiteDomainHelper(),
Mock.Of());
- // get a snapshot, get a published content
- var snapshot = snapshotService.CreatePublishedSnapshot(previewToken: null);
- var publishedContent = snapshot.Content.GetById(1);
-
// invariant is the current default
- variationAccessor.VariationContext = new VariationContext();
+ _variationAccesor.VariationContext = new VariationContext();
+ }
+
+ [Test]
+ public void StandaloneVariations()
+ {
+ // this test implements a full standalone NuCache (based upon a test IDataSource, does not
+ // use any local db files, does not rely on any database) - and tests variations
+
+ Init();
+
+ // get a snapshot, get a published content
+ var snapshot = _snapshotService.CreatePublishedSnapshot(previewToken: null);
+ var publishedContent = snapshot.Content.GetById(1);
Assert.IsNotNull(publishedContent);
Assert.AreEqual("It Works1!", publishedContent.Name);
@@ -182,31 +214,31 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("name-uk2", draftContent.GetCulture("en-UK").Name);
// now french is default
- variationAccessor.VariationContext = new VariationContext("fr-FR");
+ _variationAccesor.VariationContext = new VariationContext("fr-FR");
Assert.AreEqual("val-fr1", publishedContent.Value("prop"));
Assert.AreEqual("name-fr1", publishedContent.GetCulture().Name);
Assert.AreEqual("name-fr1", publishedContent.Name);
Assert.AreEqual(new DateTime(2018, 01, 01, 01, 00, 00), publishedContent.GetCulture().Date);
// now uk is default
- variationAccessor.VariationContext = new VariationContext("en-UK");
+ _variationAccesor.VariationContext = new VariationContext("en-UK");
Assert.AreEqual("val-uk1", publishedContent.Value("prop"));
Assert.AreEqual("name-uk1", publishedContent.GetCulture().Name);
Assert.AreEqual("name-uk1", publishedContent.Name);
Assert.AreEqual(new DateTime(2018, 01, 02, 01, 00, 00), publishedContent.GetCulture().Date);
- // invariant needs to be retrieved explicitely, when it's not default
+ // invariant needs to be retrieved explicitly, when it's not default
Assert.AreEqual("val1", publishedContent.Value("prop", culture: ""));
// but,
// if the content type / property type does not vary, then it's all invariant again
// modify the content type and property type, notify the snapshot service
- contentType.Variations = ContentVariation.Nothing;
- propertyType.Variations = ContentVariation.Nothing;
- snapshotService.Notify(new[] { new ContentTypeCacheRefresher.JsonPayload("IContentType", publishedContent.ContentType.Id, ContentTypeChangeTypes.RefreshMain) });
+ _contentType.Variations = ContentVariation.Nothing;
+ _propertyType.Variations = ContentVariation.Nothing;
+ _snapshotService.Notify(new[] { new ContentTypeCacheRefresher.JsonPayload("IContentType", publishedContent.ContentType.Id, ContentTypeChangeTypes.RefreshMain) });
// get a new snapshot (nothing changed in the old one), get the published content again
- var anotherSnapshot = snapshotService.CreatePublishedSnapshot(previewToken: null);
+ var anotherSnapshot = _snapshotService.CreatePublishedSnapshot(previewToken: null);
var againContent = anotherSnapshot.Content.GetById(1);
Assert.AreEqual(ContentVariation.Nothing, againContent.ContentType.Variations);
@@ -216,5 +248,42 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("It Works1!", againContent.Name);
Assert.AreEqual("val1", againContent.Value("prop"));
}
+
+ [Test]
+ public void IsDraftIsPublished()
+ {
+ Init();
+
+ // get the published published content
+ var s = _snapshotService.CreatePublishedSnapshot(null);
+ var c1 = s.Content.GetById(1);
+
+ // published content = nothing is draft here
+ Assert.IsFalse(c1.IsDraft("fr-FR"));
+ Assert.IsFalse(c1.IsDraft("en-UK"));
+ Assert.IsFalse(c1.IsDraft("dk-DA"));
+ Assert.IsFalse(c1.IsDraft("de-DE"));
+
+ // and only those with published name, are published
+ Assert.IsTrue(c1.IsPublished("fr-FR"));
+ Assert.IsTrue(c1.IsPublished("en-UK"));
+ Assert.IsFalse(c1.IsDraft("dk-DA"));
+ Assert.IsTrue(c1.IsPublished("de-DE"));
+
+ // get the draft published content
+ var c2 = s.Content.GetById(true, 1);
+
+ // draft content = we have drafts
+ Assert.IsTrue(c2.IsDraft("fr-FR"));
+ Assert.IsTrue(c2.IsDraft("en-UK"));
+ Assert.IsTrue(c2.IsDraft("dk-DA"));
+ Assert.IsFalse(c2.IsDraft("de-DE")); // except for the one that does not
+
+ // and only those with published name, are published
+ Assert.IsTrue(c2.IsPublished("fr-FR"));
+ Assert.IsTrue(c2.IsPublished("en-UK"));
+ Assert.IsFalse(c2.IsPublished("dk-DA"));
+ Assert.IsTrue(c2.IsPublished("de-DE"));
+ }
}
}
diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs
index 73f3cd1537..283ed1edd9 100644
--- a/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs
+++ b/src/Umbraco.Tests/PublishedContent/PublishedContentDataTableTests.cs
@@ -217,6 +217,7 @@ namespace Umbraco.Tests.PublishedContent
public Guid Version { get; set; }
public int Level { get; set; }
public bool IsDraft(string culture = null) => false;
+ public bool IsPublished(string culture = null) => true;
public IEnumerable Properties { get; set; }
diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs
index 42703f9bae..ac1c57d409 100644
--- a/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs
+++ b/src/Umbraco.Tests/PublishedContent/PublishedContentLanguageVariantTests.cs
@@ -335,7 +335,7 @@ namespace Umbraco.Tests.PublishedContent
{
var content = UmbracoContext.Current.ContentCache.GetAtRoot().First().Children.First();
- // hack the value, pretend the converter would return something
+ // HACK: the value, pretend the converter would return something
var prop = content.GetProperty("welcomeText") as SolidPublishedPropertyWithLanguageVariants;
Assert.IsNotNull(prop);
prop.SetValue("nl", "nope"); // HasValue false but getting value returns this
diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs
index d18c6b6668..c5bcd29589 100644
--- a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs
+++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs
@@ -20,7 +20,7 @@ namespace Umbraco.Tests.PublishedContent
{
base.Compose();
- // fixme - what about the if (PropertyValueConvertersResolver.HasCurrent == false) ??
+ // FIXME: what about the if (PropertyValueConvertersResolver.HasCurrent == false) ??
// can we risk double - registering and then, what happens?
Composition.WithCollectionBuilder()
diff --git a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
index f7077ecb3a..a838e06a9a 100644
--- a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
+++ b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
@@ -192,6 +192,7 @@ namespace Umbraco.Tests.PublishedContent
public PublishedItemType ItemType { get { return PublishedItemType.Content; } }
public bool IsDraft(string culture = null) => false;
+ public bool IsPublished(string culture = null) => true;
#endregion
diff --git a/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs b/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs
index 2d14aa1c08..0b98ec64b6 100644
--- a/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs
+++ b/src/Umbraco.Tests/Publishing/PublishingStrategyTests.cs
@@ -28,7 +28,7 @@ namespace Umbraco.Tests.Publishing
[Test]
public void Can_Publish_And_Update_Xml_Cache()
{
- //TODO Create new test
+ // TODO: Create new test
}
public IEnumerable CreateTestData()
diff --git a/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs b/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs
index 4059cb1858..2aa01916fb 100644
--- a/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs
+++ b/src/Umbraco.Tests/Routing/ContentFinderByAliasTests.cs
@@ -9,7 +9,7 @@ using Umbraco.Web.Routing;
namespace Umbraco.Tests.Routing
{
- //TODO: We should be able to decouple this from the base db tests since we're just mocking the services now
+ // TODO: We should be able to decouple this from the base db tests since we're just mocking the services now
[TestFixture]
public class ContentFinderByAliasTests : UrlRoutingTestBase
diff --git a/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs b/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs
index 8bbd7c6679..c1abb5a3a5 100644
--- a/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs
+++ b/src/Umbraco.Tests/Routing/ContentFinderByPageIdQueryTests.cs
@@ -10,9 +10,9 @@ namespace Umbraco.Tests.Routing
{
[TestCase("/?umbPageId=1046", 1046)]
[TestCase("/?UMBPAGEID=1046", 1046)]
- [TestCase("/default.aspx?umbPageId=1046", 1046)] //TODO: Should this match??
- [TestCase("/some/other/page?umbPageId=1046", 1046)] //TODO: Should this match??
- [TestCase("/some/other/page.aspx?umbPageId=1046", 1046)] //TODO: Should this match??
+ [TestCase("/default.aspx?umbPageId=1046", 1046)] // TODO: Should this match??
+ [TestCase("/some/other/page?umbPageId=1046", 1046)] // TODO: Should this match??
+ [TestCase("/some/other/page.aspx?umbPageId=1046", 1046)] // TODO: Should this match??
public void Lookup_By_Page_Id(string urlAsString, int nodeMatch)
{
var umbracoContext = GetUmbracoContext(urlAsString);
diff --git a/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs b/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs
index fa8beea2c2..85168e4490 100644
--- a/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs
+++ b/src/Umbraco.Tests/Routing/ContentFinderByUrlTests.cs
@@ -39,7 +39,7 @@ namespace Umbraco.Tests.Routing
Assert.IsTrue(Current.Configs.Global().HideTopLevelNodeFromPath);
- // fixme debugging - going further down, the routes cache is NOT empty?!
+ // FIXME: debugging - going further down, the routes cache is NOT empty?!
if (urlString == "/home/sub1")
System.Diagnostics.Debugger.Break();
diff --git a/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs b/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs
index 8e9e52258c..46b10929cf 100644
--- a/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs
+++ b/src/Umbraco.Tests/Routing/GetContentUrlsTests.cs
@@ -45,7 +45,7 @@ namespace Umbraco.Tests.Routing
{
var contentType = MockedContentTypes.CreateBasicContentType();
var content = MockedContent.CreateBasicContent(contentType);
- content.Id = 1046; //fixme: we are using this ID only because it's built into the test XML published cache
+ content.Id = 1046; // FIXME: we are using this ID only because it's built into the test XML published cache
content.Path = "-1,1046";
var umbContext = GetUmbracoContext("http://localhost:8000");
@@ -66,7 +66,7 @@ namespace Umbraco.Tests.Routing
{
var contentType = MockedContentTypes.CreateBasicContentType();
var content = MockedContent.CreateBasicContent(contentType);
- content.Id = 1046; //fixme: we are using this ID only because it's built into the test XML published cache
+ content.Id = 1046; // FIXME: we are using this ID only because it's built into the test XML published cache
content.Path = "-1,1046";
content.Published = true;
@@ -92,13 +92,13 @@ namespace Umbraco.Tests.Routing
{
var contentType = MockedContentTypes.CreateBasicContentType();
var parent = MockedContent.CreateBasicContent(contentType);
- parent.Id = 1046; //fixme: we are using this ID only because it's built into the test XML published cache
+ parent.Id = 1046; // FIXME: we are using this ID only because it's built into the test XML published cache
parent.Name = "home";
parent.Path = "-1,1046";
parent.Published = true;
var child = MockedContent.CreateBasicContent(contentType);
child.Name = "sub1";
- child.Id = 1173; //fixme: we are using this ID only because it's built into the test XML published cache
+ child.Id = 1173; // FIXME: we are using this ID only because it's built into the test XML published cache
child.Path = "-1,1046,1173";
child.Published = true;
@@ -119,7 +119,7 @@ namespace Umbraco.Tests.Routing
Assert.IsTrue(urls[0].IsUrl);
}
- //TODO: We need a lot of tests here, the above was just to get started with being able to unit test this method
+ // TODO: We need a lot of tests here, the above was just to get started with being able to unit test this method
// * variant URLs without domains assigned, what happens?
// * variant URLs with domains assigned, but also having more languages installed than there are domains/cultures assigned
// * variant URLs with an ancestor culture unpublished
diff --git a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs
index e681c8556d..569f5382e8 100644
--- a/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs
+++ b/src/Umbraco.Tests/Routing/RenderRouteHandlerTests.cs
@@ -57,7 +57,7 @@ namespace Umbraco.Tests.Routing
base.Compose();
// set the default RenderMvcController
- Current.DefaultRenderMvcControllerType = typeof(RenderMvcController); // fixme WRONG!
+ Current.DefaultRenderMvcControllerType = typeof(RenderMvcController); // FIXME: Wrong!
var surfaceControllerTypes = new SurfaceControllerTypeCollection(Composition.TypeLoader.GetSurfaceControllers());
Composition.RegisterUnique(surfaceControllerTypes);
@@ -110,7 +110,7 @@ namespace Umbraco.Tests.Routing
//test all template name styles to match the ActionName
- //[TestCase("home-\\234^^*32page")] //TODO: This fails!
+ //[TestCase("home-\\234^^*32page")] // TODO: This fails!
[TestCase("home-page")]
[TestCase("home-page")]
[TestCase("home-page")]
diff --git a/src/Umbraco.Tests/Routing/RoutesCacheTests.cs b/src/Umbraco.Tests/Routing/RoutesCacheTests.cs
index 68e80076dd..76c2a45ab2 100644
--- a/src/Umbraco.Tests/Routing/RoutesCacheTests.cs
+++ b/src/Umbraco.Tests/Routing/RoutesCacheTests.cs
@@ -22,7 +22,7 @@ namespace Umbraco.Tests.Routing
var cache = umbracoContext.PublishedSnapshot.Content as PublishedContentCache;
if (cache == null) throw new Exception("Unsupported IPublishedContentCache, only the Xml one is supported.");
- // fixme not sure?
+ // FIXME: not sure?
//PublishedContentCache.UnitTesting = false; // else does not write to routes cache
//Assert.IsFalse(PublishedContentCache.UnitTesting);
diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
index c87a02f43a..6d7668ceab 100644
--- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
+++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
@@ -28,7 +28,7 @@ namespace Umbraco.Tests.Routing
{
base.SetUp();
- // fixme - be able to get the UmbracoModule from the container. any reason settings were from testobjects?
+ // FIXME: be able to get the UmbracoModule from the container. any reason settings were from testobjects?
//create the module
var logger = Mock.Of();
var globalSettings = TestObjects.GetGlobalSettings();
@@ -44,7 +44,7 @@ namespace Umbraco.Tests.Routing
new UrlProviderCollection(new IUrlProvider[0]),
runtime,
logger,
- null, // fixme - PublishedRouter complexities...
+ null, // FIXME: PublishedRouter complexities...
Mock.Of()
);
diff --git a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs
index c894659865..ee3bca42e9 100644
--- a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs
+++ b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs
@@ -110,7 +110,7 @@ namespace Umbraco.Tests.Runtimes
return configs;
}
- // fixme so how the f* should we do it now?
+ // FIXME: so how the f* should we do it now?
/*
// pretend we have the proper migration
// else BootFailedException because our mock IUmbracoDatabaseFactory does not provide databases
diff --git a/src/Umbraco.Tests/Runtimes/StandaloneTests.cs b/src/Umbraco.Tests/Runtimes/StandaloneTests.cs
index 3a52eea17c..3790a49cfc 100644
--- a/src/Umbraco.Tests/Runtimes/StandaloneTests.cs
+++ b/src/Umbraco.Tests/Runtimes/StandaloneTests.cs
@@ -53,13 +53,13 @@ namespace Umbraco.Tests.Runtimes
// settings
// reset the current version to 0.0.0, clear connection strings
ConfigurationManager.AppSettings["umbracoConfigurationStatus"] = "";
- // fixme we need a better management of settings here (and, true config files?)
+ // FIXME: we need a better management of settings here (and, true config files?)
// create the very basic and essential things we need
var logger = new ConsoleLogger();
var profiler = new LogProfiler(logger);
var profilingLogger = new ProfilingLogger(logger, profiler);
- var appCaches = new AppCaches(); // fixme has HttpRuntime stuff?
+ var appCaches = new AppCaches(); // FIXME: has HttpRuntime stuff?
var databaseFactory = new UmbracoDatabaseFactory(logger, new Lazy(() => factory.GetInstance()));
var typeLoader = new TypeLoader(appCaches.RuntimeCache, LocalTempStorage.Default, profilingLogger);
var mainDom = new SimpleMainDom();
@@ -87,7 +87,7 @@ namespace Umbraco.Tests.Runtimes
composers.Compose();
// must registers stuff that WebRuntimeComponent would register otherwise
- // fixme UmbracoContext creates a snapshot that it does not register with the accessor
+ // FIXME: UmbracoContext creates a snapshot that it does not register with the accessor
// and so, we have to use the UmbracoContextPublishedSnapshotAccessor
// the UmbracoContext does not know about the accessor
// else that would be a catch-22 where they both know about each other?
@@ -177,7 +177,7 @@ namespace Umbraco.Tests.Runtimes
Assert.AreEqual("test", content.Name);
// need an UmbracoCOntext to access the cache
- // fixme - not exactly pretty, should not depend on HttpContext
+ // FIXME: not exactly pretty, should not depend on HttpContext
var httpContext = Mock.Of();
var withUmbracoContext = UmbracoContext.EnsureContext(httpContext);
var umbracoContext = Umbraco.Web.Composing.Current.UmbracoContext;
diff --git a/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs b/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs
index 68e69f4cd6..c955f88f67 100644
--- a/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs
+++ b/src/Umbraco.Tests/Scoping/PassThroughEventDispatcherTests.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Tests.Scoping
[NUnit.Framework.Ignore("Cannot dispatch events on NoScope!")]
public class PassThroughEventDispatcherTests
{
- // fixme so... should we remove, or enable, these tests?
+ // FIXME: so... should we remove, or enable, these tests?
// [Test]
// public void TriggersCancelableEvents()
diff --git a/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs b/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs
index eb545fdb4f..31681067d6 100644
--- a/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs
+++ b/src/Umbraco.Tests/Scoping/ScopedNuCacheTests.cs
@@ -43,7 +43,7 @@ namespace Umbraco.Tests.Scoping
// the cache refresher component needs to trigger to refresh caches
// but then, it requires a lot of plumbing ;(
- // fixme - and we cannot inject a DistributedCache yet
+ // FIXME: and we cannot inject a DistributedCache yet
// so doing all this mess
Composition.RegisterUnique();
Composition.RegisterUnique(f => Mock.Of());
diff --git a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs
index dee7a99ad0..b85a79f326 100644
--- a/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs
+++ b/src/Umbraco.Tests/Scoping/ScopedRepositoryTests.cs
@@ -29,7 +29,7 @@ namespace Umbraco.Tests.Scoping
// the cache refresher component needs to trigger to refresh caches
// but then, it requires a lot of plumbing ;(
- // fixme - and we cannot inject a DistributedCache yet
+ // FIXME: and we cannot inject a DistributedCache yet
// so doing all this mess
Composition.RegisterUnique();
Composition.RegisterUnique(f => Mock.Of());
diff --git a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs
index 568bafa4e6..11479ea3eb 100644
--- a/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs
+++ b/src/Umbraco.Tests/Scoping/ScopedXmlTests.cs
@@ -32,7 +32,7 @@ namespace Umbraco.Tests.Scoping
// the cache refresher component needs to trigger to refresh caches
// but then, it requires a lot of plumbing ;(
- // fixme - and we cannot inject a DistributedCache yet
+ // FIXME: and we cannot inject a DistributedCache yet
// so doing all this mess
Composition.RegisterUnique();
Composition.RegisterUnique(f => Mock.Of());
diff --git a/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs b/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs
index 23e5e472a3..f0409d8928 100644
--- a/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs
+++ b/src/Umbraco.Tests/Security/BackOfficeCookieManagerTests.cs
@@ -69,6 +69,6 @@ namespace Umbraco.Tests.Security
Assert.IsTrue(result);
}
- //TODO : Write remaining tests for `ShouldAuthenticateRequest`
+ // TODO: Write remaining tests for `ShouldAuthenticateRequest`
}
}
diff --git a/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs b/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs
index 62a3526af5..5e97bea2c1 100644
--- a/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs
+++ b/src/Umbraco.Tests/Services/ContentServiceTagsTests.cs
@@ -35,7 +35,7 @@ namespace Umbraco.Tests.Services
{
base.Compose();
- // fixme - do it differently
+ // FIXME: do it differently
Composition.Register(factory => factory.GetInstance().TextService);
}
@@ -392,11 +392,11 @@ namespace Umbraco.Tests.Services
propertyType.Variations = ContentVariation.Nothing;
contentTypeService.Save(contentType);
- //fixme: This throws due to index violations
+ // FIXME: This throws due to index violations
propertyType.Variations = ContentVariation.Culture;
contentTypeService.Save(contentType);
- //TODO: Assert results
+ // TODO: Assert results
}
[Test]
@@ -526,7 +526,7 @@ namespace Umbraco.Tests.Services
tags = tagService.GetTagsForEntity(content1.Id);
Assert.AreEqual(5, tags.Count());
- // fixme tag & tree issue
+ // FIXME: tag & tree issue
// when we publish, we 'just' publish the top one and not the ones below = fails
// what we should do is... NOT clear tags when unpublishing or trashing or...
// and just update the tag service to NOT return anything related to trashed or
@@ -593,7 +593,7 @@ namespace Umbraco.Tests.Services
var tags = tagService.GetTagsForEntity(content1.Id);
Assert.AreEqual(0, tags.Count());
- // fixme tag & tree issue
+ // FIXME: tag & tree issue
// when we (un)publish, we 'just' publish the top one and not the ones below = fails
// see similar note above
tags = tagService.GetTagsForEntity(content2.Id);
diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs
index 9490213d62..f633c003ba 100644
--- a/src/Umbraco.Tests/Services/ContentServiceTests.cs
+++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs
@@ -38,8 +38,8 @@ namespace Umbraco.Tests.Services
Logger = UmbracoTestOptions.Logger.Console)]
public class ContentServiceTests : TestWithSomeContentBase
{
- //TODO Add test to verify there is only ONE newest document/content in {Constants.DatabaseSchema.Tables.Document} table after updating.
- //TODO Add test to delete specific version (with and without deleting prior versions) and versions by date.
+ // TODO: Add test to verify there is only ONE newest document/content in {Constants.DatabaseSchema.Tables.Document} table after updating.
+ // TODO: Add test to delete specific version (with and without deleting prior versions) and versions by date.
public override void SetUp()
{
@@ -2422,13 +2422,13 @@ namespace Umbraco.Tests.Services
Assert.IsFalse(content.Published);
Assert.IsTrue(content.Edited);
- // fixme - depending on 1 line in ContentBaseFactory.BuildEntity
+ // FIXME: depending on 1 line in ContentBaseFactory.BuildEntity
// the published infos can be gone or not
// if gone, it's not consistent with above
Assert.AreEqual(vpk, ((Content) content).VersionId);
Assert.AreEqual(ppk, ((Content) content).PublishedVersionId); // still there
- // fixme - depending on 1 line in ContentRepository.MapDtoToContent
+ // FIXME: depending on 1 line in ContentRepository.MapDtoToContent
// the published values can be null or not
// if null, it's not consistent with above
//Assert.IsNull(content.GetValue("title", published: true));
@@ -2444,7 +2444,7 @@ namespace Umbraco.Tests.Services
//
//contentService.SaveAndPublish(content);
- // fixme - what shall we do of all this?
+ // FIXME: what shall we do of all this?
/*
// this basically republishes a content
// what if it never was published?
@@ -2455,11 +2455,11 @@ namespace Umbraco.Tests.Services
Assert.IsTrue(content.Published);
Assert.IsFalse(content.Edited);
- // fixme - should it be 2 or 3
+ // FIXME: should it be 2 or 3
versions = contentService.GetVersions(content.Id);
Assert.AreEqual(2, versions.Count());
- // fixme - now test rollbacks
+ // FIXME: now test rollbacks
var version = contentService.GetByVersion(content.Id); // test that it gets a version - should be GetVersion
var previousVersion = contentService.GetVersions(content.Id).Skip(1).FirstOrDefault(); // need an optimized way to do this
content.CopyValues(version); // copies the edited value - always
@@ -2498,7 +2498,7 @@ namespace Umbraco.Tests.Services
//the name will be set to the default culture variant name
Assert.AreEqual("name-us", content.Name);
- //fixme - should we always sync the invariant name even on update? see EnsureInvariantNameValues
+ // FIXME: should we always sync the invariant name even on update? see EnsureInvariantNameValues
////updating the default culture variant name should also update the invariant name so they stay in sync
//content.SetName("name-us-2", langUk.IsoCode);
//contentService.Save(content);
@@ -2663,7 +2663,7 @@ namespace Umbraco.Tests.Services
var contentType = contentTypeService.Get("umbTextpage");
contentType.Variations = ContentVariation.Culture;
contentType.AddPropertyType(new PropertyType(Constants.PropertyEditors.Aliases.TextBox, ValueStorageType.Nvarchar, "prop") { Variations = ContentVariation.Culture });
- // fixme add test w/ an invariant prop
+ // FIXME: add test w/ an invariant prop
contentTypeService.Save(contentType);
var contentService = ServiceContext.ContentService;
diff --git a/src/Umbraco.Tests/Services/MemberServiceTests.cs b/src/Umbraco.Tests/Services/MemberServiceTests.cs
index 13cde1c659..0c9c543b0d 100644
--- a/src/Umbraco.Tests/Services/MemberServiceTests.cs
+++ b/src/Umbraco.Tests/Services/MemberServiceTests.cs
@@ -33,7 +33,7 @@ namespace Umbraco.Tests.Services
{
base.SetUp();
- //hack! but we have no choice until we remove the SavePassword method from IMemberService
+ // HACK: but we have no choice until we remove the SavePassword method from IMemberService
var providerMock = new Mock(ServiceContext.MemberService, ServiceContext.MemberTypeService) { CallBase = true };
providerMock.Setup(@base => @base.AllowManuallyChangingPassword).Returns(false);
providerMock.Setup(@base => @base.PasswordFormat).Returns(MembershipPasswordFormat.Hashed);
diff --git a/src/Umbraco.Tests/Services/PerformanceTests.cs b/src/Umbraco.Tests/Services/PerformanceTests.cs
index 09743b350f..7d73d95e74 100644
--- a/src/Umbraco.Tests/Services/PerformanceTests.cs
+++ b/src/Umbraco.Tests/Services/PerformanceTests.cs
@@ -31,7 +31,7 @@ namespace Umbraco.Tests.Services
[NUnit.Framework.Ignore("These should not be run by the server, only directly as they are only benchmark tests")]
public class PerformanceTests : TestWithDatabaseBase
{
- // fixme probably making little sense in places due to scope creating a transaction?!
+ // FIXME: probably making little sense in places due to scope creating a transaction?!
protected override string GetDbConnectionString()
{
diff --git a/src/Umbraco.Tests/Services/SectionServiceTests.cs b/src/Umbraco.Tests/Services/SectionServiceTests.cs
index 84eb0d1cbc..d6bf26184b 100644
--- a/src/Umbraco.Tests/Services/SectionServiceTests.cs
+++ b/src/Umbraco.Tests/Services/SectionServiceTests.cs
@@ -48,7 +48,7 @@ namespace Umbraco.Tests.Services
};
userGroupA.AddAllowedSection("media");
userGroupA.AddAllowedSection("settings");
- //TODO: This is failing the test
+ // TODO: This is failing the test
ServiceContext.UserService.Save(userGroupA, new[] { user.Id }, false);
var userGroupB = new UserGroup
diff --git a/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs b/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs
index 0d39fcc9e5..5fd5710a79 100644
--- a/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs
+++ b/src/Umbraco.Tests/Strings/DefaultShortStringHelperTests.cs
@@ -68,7 +68,7 @@ namespace Umbraco.Tests.Strings
BreakTermsOnUpper = true
}));
- // fixme - move to a "compose" thing?
+ // FIXME: move to a "compose" thing?
Composition.RegisterUnique(f => _helper);
}
@@ -337,8 +337,8 @@ namespace Umbraco.Tests.Strings
}));
Assert.AreEqual("house*2", helper.CleanString("house (2)", CleanStringType.Alias));
- // FIXME but for a filename we want to keep them!
- // FIXME and what about a url?
+ // FIXME: but for a filename we want to keep them!
+ // FIXME: and what about a url?
}
[Test]
@@ -442,8 +442,8 @@ namespace Umbraco.Tests.Strings
// E is a word (too short to be an acronym)
// FF is an acronym
- // FIXME "C" can't be an acronym
- // FIXME "DBXreview" = acronym?!
+ // FIXME: "C" can't be an acronym
+ // FIXME: "DBXreview" = acronym?!
Assert.AreEqual("aaa BBB CCc Ddd E FF", helper.CleanString("aaa BBB CCc Ddd E FF", CleanStringType.Alias)); // unchanged
Assert.AreEqual("aaa Bbb Ccc Ddd E FF", helper.CleanString("aaa BBB CCc Ddd E FF", CleanStringType.Alias | CleanStringType.CamelCase));
diff --git a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs
index 5978820601..602b5907d8 100644
--- a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs
+++ b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestControllerActivatorBase.cs
@@ -64,7 +64,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting
var globalSettings = SettingsForTests.GenerateMockGlobalSettings();
- // fixme v8?
+ // FIXME: v8?
////new app context
//var dbCtx = new Mock(Mock.Of(), Mock.Of(), Mock.Of(), "test");
////ensure these are set so that the appctx is 'Configured'
diff --git a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs
index 6ba6b672db..95b5a3bfeb 100644
--- a/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs
+++ b/src/Umbraco.Tests/TestHelpers/ControllerTesting/TestStartup.cs
@@ -29,7 +29,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting
{
var httpConfig = new HttpConfiguration();
- //TODO: Enable this if you can't see the errors produced
+ // TODO: Enable this if you can't see the errors produced
//var traceWriter = httpConfig.EnableSystemDiagnosticsTracing();
//traceWriter.IsVerbose = true;
//traceWriter.MinimumLevel = TraceLevel.Debug;
diff --git a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs
index cfd935cd82..37be4aea6d 100644
--- a/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs
+++ b/src/Umbraco.Tests/TestHelpers/SettingsForTests.cs
@@ -129,7 +129,7 @@ namespace Umbraco.Tests.TestHelpers
{
if (_defaultUmbracoSettings == null)
{
- //TODO: Just make this mocks instead of reading from the config
+ // TODO: Just make this mocks instead of reading from the config
var config = new FileInfo(TestHelper.MapPathForTest("~/Configurations/UmbracoSettings/web.config"));
diff --git a/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs b/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs
index 58c8e37cbf..a9abe96232 100644
--- a/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs
+++ b/src/Umbraco.Tests/TestHelpers/Stubs/TestPublishedContent.cs
@@ -48,6 +48,7 @@ namespace Umbraco.Tests.TestHelpers.Stubs
public string GetUrl(string culture = null) => throw new NotSupportedException();
public PublishedItemType ItemType => ContentType.ItemType;
public bool IsDraft(string culture = null) => false;
+ public bool IsPublished(string culture = null) => true;
public IPublishedContent Parent { get; set; }
public IEnumerable Children { get; set; }
diff --git a/src/Umbraco.Tests/TestHelpers/TestHelper.cs b/src/Umbraco.Tests/TestHelpers/TestHelper.cs
index b6f597bf46..dc692af36a 100644
--- a/src/Umbraco.Tests/TestHelpers/TestHelper.cs
+++ b/src/Umbraco.Tests/TestHelpers/TestHelper.cs
@@ -98,7 +98,7 @@ namespace Umbraco.Tests.TestHelpers
File.Delete(umbracoSettingsFile);
}
- // fixme obsolete the dateTimeFormat thing and replace with dateDelta
+ // FIXME: obsolete the dateTimeFormat thing and replace with dateDelta
public static void AssertPropertyValuesAreEqual(object actual, object expected, string dateTimeFormat = null, Func sorter = null, string[] ignoreProperties = null)
{
const int dateDeltaMilliseconds = 500; // .5s
diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs
index c56eae9cd8..660d0f201e 100644
--- a/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs
+++ b/src/Umbraco.Tests/TestHelpers/TestObjects-Mocks.cs
@@ -55,7 +55,7 @@ namespace Umbraco.Tests.TestHelpers
/// A ServiceContext.
public ServiceContext GetServiceContextMock(IFactory container = null)
{
- // fixme - else some tests break - figure it out
+ // FIXME: else some tests break - figure it out
container = null;
return ServiceContext.CreatePartial(
@@ -125,8 +125,8 @@ namespace Umbraco.Tests.TestHelpers
public IUmbracoSettingsSection GetUmbracoSettings()
{
- //fixme Why not use the SettingsForTest.GenerateMock ... ?
- //fixme Shouldn't we use the default ones so they are the same instance for each test?
+ // FIXME: Why not use the SettingsForTest.GenerateMock ... ?
+ // FIXME: Shouldn't we use the default ones so they are the same instance for each test?
var umbracoSettingsMock = new Mock();
var webRoutingSectionMock = new Mock();
diff --git a/src/Umbraco.Tests/TestHelpers/TestObjects.cs b/src/Umbraco.Tests/TestHelpers/TestObjects.cs
index 109860146c..7a9702031b 100644
--- a/src/Umbraco.Tests/TestHelpers/TestObjects.cs
+++ b/src/Umbraco.Tests/TestHelpers/TestObjects.cs
@@ -236,9 +236,9 @@ namespace Umbraco.Tests.TestHelpers
{
if (databaseFactory == null)
{
- //var mappersBuilder = new MapperCollectionBuilder(Current.Container); // fixme
- //mappersBuilder.AddCore();
- //var mappers = mappersBuilder.CreateCollection();
+ // var mappersBuilder = new MapperCollectionBuilder(Current.Container); // FIXME:
+ // mappersBuilder.AddCore();
+ // var mappers = mappersBuilder.CreateCollection();
var mappers = Current.Factory.GetInstance();
databaseFactory = new UmbracoDatabaseFactory(Constants.System.UmbracoConnectionName, logger, new Lazy(() => mappers));
}
diff --git a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs
index b312bc1607..76b163a2df 100644
--- a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs
+++ b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs
@@ -102,10 +102,10 @@ namespace Umbraco.Tests.TestHelpers
public override void TearDown()
{
var profilingLogger = Factory.TryGetInstance();
- var timer = profilingLogger?.TraceDuration("teardown"); // fixme move that one up
+ var timer = profilingLogger?.TraceDuration("teardown"); // FIXME: move that one up
try
{
- // fixme - should we first kill all scopes?
+ // FIXME: should we first kill all scopes?
if (Options.Database == UmbracoTestOptions.Database.NewSchemaPerTest)
RemoveDatabaseFile();
@@ -127,7 +127,7 @@ namespace Umbraco.Tests.TestHelpers
{
using (ProfilingLogger.TraceDuration("Create database."))
{
- CreateSqlCeDatabase(); // todo faster!
+ CreateSqlCeDatabase(); // TODO: faster!
}
// ensure the configuration matches the current version for tests
@@ -136,7 +136,7 @@ namespace Umbraco.Tests.TestHelpers
using (ProfilingLogger.TraceDuration("Initialize database."))
{
- InitializeDatabase(); // todo faster!
+ InitializeDatabase(); // TODO: faster!
}
}
@@ -229,7 +229,7 @@ namespace Umbraco.Tests.TestHelpers
protected IPublishedSnapshotService PublishedSnapshotService { get; set; }
- protected override void Initialize() // fixme - should NOT be here!
+ protected override void Initialize() // FIXME: should NOT be here!
{
base.Initialize();
@@ -314,7 +314,7 @@ namespace Umbraco.Tests.TestHelpers
}
}
- // fixme is this needed?
+ // FIXME: is this needed?
private void CloseDbConnections(IUmbracoDatabase database)
{
//Ensure that any database connections from a previous test is disposed.
diff --git a/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs b/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs
index 2bf4ba2716..4013d93cd3 100644
--- a/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs
+++ b/src/Umbraco.Tests/Testing/UmbracoTestAttribute.cs
@@ -24,8 +24,9 @@ namespace Umbraco.Tests.Testing
public bool AutoMapper { get => _autoMapper.ValueOrDefault(WithApplication); set => _autoMapper.Set(value); }
private readonly Settable _autoMapper = new Settable();
+ // FIXME: to be completed
///
- /// Gets or sets a value indicating ... FIXME to be completed
+ /// Gets or sets a value indicating ...
///
public bool PublishedRepositoryEvents { get => _publishedRepositoryEvents.ValueOrDefault(false); set => _publishedRepositoryEvents.Set(value); }
private readonly Settable _publishedRepositoryEvents = new Settable();
diff --git a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs
index 7cd7be240b..9616a26891 100644
--- a/src/Umbraco.Tests/Testing/UmbracoTestBase.cs
+++ b/src/Umbraco.Tests/Testing/UmbracoTestBase.cs
@@ -123,7 +123,7 @@ namespace Umbraco.Tests.Testing
// get/merge the attributes marking the method and/or the classes
Options = TestOptionAttributeBase.GetTestOptions();
- // fixme - align to runtimes & components - don't redo everything here
+ // FIXME: align to runtimes & components - don't redo everything here
var (logger, profiler) = GetLoggers(Options.Logger);
var proflogger = new ProfilingLogger(logger, profiler);
@@ -427,7 +427,7 @@ namespace Umbraco.Tests.Testing
// reset all other static things that should not be static ;(
UriUtility.ResetAppDomainAppVirtualPath();
- SettingsForTests.Reset(); // fixme - should it be optional?
+ SettingsForTests.Reset(); // FIXME: should it be optional?
Mapper.Reset();
diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj
index 11f5527a8c..cd73b2836b 100644
--- a/src/Umbraco.Tests/Umbraco.Tests.csproj
+++ b/src/Umbraco.Tests/Umbraco.Tests.csproj
@@ -292,7 +292,6 @@
-
@@ -499,14 +498,6 @@
Designer
-
- Designer
- Always
-
-
- Designer
- Always
- DesignerAlways
diff --git a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs
index 5bc1fbfdaa..2c71d1fe3e 100644
--- a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs
+++ b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataContentService.cs
@@ -9,7 +9,7 @@ using Umbraco.Examine;
namespace Umbraco.Tests.UmbracoExamine
{
- //TODO: This is ultra hack and still left over from legacy but still works for testing atm
+ // TODO: This is ultra hack and still left over from legacy but still works for testing atm
public class ExamineDemoDataContentService
{
public const int ProtectedNode = 1142;
diff --git a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs
index 8dcb170816..035a31b240 100644
--- a/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs
+++ b/src/Umbraco.Tests/UmbracoExamine/ExamineDemoDataMediaService.cs
@@ -7,7 +7,7 @@ using System.Xml.XPath;
namespace Umbraco.Tests.UmbracoExamine
{
- //TODO: This is ultra hack and still left over from legacy but still works for testing atm
+ // TODO: This is ultra hack and still left over from legacy but still works for testing atm
internal class ExamineDemoDataMediaService
{
public ExamineDemoDataMediaService()
diff --git a/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs b/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs
index 7bd47bed66..cf0bf689a1 100644
--- a/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs
+++ b/src/Umbraco.Tests/Web/Controllers/ContentControllerTests.cs
@@ -393,7 +393,7 @@ namespace Umbraco.Tests.Web.Controllers
Assert.IsTrue(display.Errors.ContainsKey("_content_variant_en-US_"));
}
- //TODO: There are SOOOOO many more tests we should write - a lot of them to do with validation
+ // TODO: There are SOOOOO many more tests we should write - a lot of them to do with validation
}
}
diff --git a/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs b/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs
index 9247cb92a0..39a9ca6211 100644
--- a/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs
+++ b/src/Umbraco.Tests/Web/HealthChecks/HealthCheckResultsTests.cs
@@ -84,8 +84,8 @@ namespace Umbraco.Tests.Web.HealthChecks
Assert.IsTrue(results.AllChecksSuccessful);
var resultAsMarkdown = results.ResultsAsMarkDown(HealthCheckNotificationVerbosity.Summary);
- Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed succesfully.") > -1);
- Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' all completed succesfully.") > -1);
+ Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed successfully.") > -1);
+ Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' all completed successfully.") > -1);
}
[Test]
@@ -101,7 +101,7 @@ namespace Umbraco.Tests.Web.HealthChecks
Assert.IsFalse(results.AllChecksSuccessful);
var resultAsMarkdown = results.ResultsAsMarkDown(HealthCheckNotificationVerbosity.Summary);
- Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed succesfully.") > -1);
+ Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed successfully.") > -1);
Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' completed with errors.") > -1);
}
@@ -119,7 +119,7 @@ namespace Umbraco.Tests.Web.HealthChecks
Assert.IsFalse(results.AllChecksSuccessful);
var resultAsMarkdown = results.ResultsAsMarkDown(HealthCheckNotificationVerbosity.Summary);
- Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed succesfully.") > -1);
+ Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 1' all completed successfully.") > -1);
Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 2' completed with errors.") > -1);
Assert.IsTrue(resultAsMarkdown.IndexOf("Checks for 'Stub check 3' completed with errors.") > -1);
}
diff --git a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs
index e95ae7b785..4bcad4f4d3 100644
--- a/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs
+++ b/src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs
@@ -30,13 +30,13 @@ namespace Umbraco.Tests.Web
{
Current.Reset();
- // fixme - now UrlProvider depends on EntityService for GetUrl(guid) - this is bad
+ // FIXME: now UrlProvider depends on EntityService for GetUrl(guid) - this is bad
// should not depend on more than IdkMap maybe - fix this!
var entityService = new Mock();
entityService.Setup(x => x.GetId(It.IsAny(), It.IsAny())).Returns(Attempt.Fail());
var serviceContext = ServiceContext.CreatePartial(entityService: entityService.Object);
- // fixme - bad in a unit test - but Udi has a static ctor that wants it?!
+ // FIXME: bad in a unit test - but Udi has a static ctor that wants it?!
var factory = new Mock();
factory.Setup(x => x.GetInstance(typeof(TypeLoader))).Returns(
new TypeLoader(NoAppCache.Instance, LocalTempStorage.Default, new ProfilingLogger(Mock.Of(), Mock.Of())));
diff --git a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js
index e9ada635e5..819c804a4f 100644
--- a/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js
+++ b/src/Umbraco.Web.UI.Client/gulp/tasks/dependencies.js
@@ -141,7 +141,8 @@ gulp.task('dependencies', function () {
"name": "flatpickr",
"src": [
"./node_modules/flatpickr/dist/flatpickr.js",
- "./node_modules/flatpickr/dist/flatpickr.css"
+ "./node_modules/flatpickr/dist/flatpickr.css",
+ "./node_modules/flatpickr/dist/l10n/*.js"
],
"base": "./node_modules/flatpickr/dist"
},
diff --git a/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less b/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less
index 9f4ef4b8f9..6bbbacd1e3 100644
--- a/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less
+++ b/src/Umbraco.Web.UI.Client/lib/bootstrap/less/forms.less
@@ -239,7 +239,7 @@ textarea {
}
// Radios and checkboxes on same line
-// TODO v3: Convert .inline to .control-inline
+// TODO: v3: Convert .inline to .control-inline
.radio.inline,
.checkbox.inline {
display: inline-block;
diff --git a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js
index f973cbac49..05568354e6 100644
--- a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js
+++ b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacySpeechBubble.js
@@ -1,5 +1,5 @@
-//TODO: WE NEED TO CONVERT ALL OF THESE METHODS TO PROXY TO OUR APPLICATION SINCE MANY CUSTOM APPS USE THIS!
+// TODO: WE NEED TO CONVERT ALL OF THESE METHODS TO PROXY TO OUR APPLICATION SINCE MANY CUSTOM APPS USE THIS!
Umbraco.Sys.registerNamespace("Umbraco.Application");
diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json
index ed28a93caf..8afb0a17e3 100644
--- a/src/Umbraco.Web.UI.Client/package-lock.json
+++ b/src/Umbraco.Web.UI.Client/package-lock.json
@@ -937,7 +937,7 @@
},
"ansi-colors": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
"dev": true,
"requires": {
@@ -955,7 +955,7 @@
},
"ansi-escapes": {
"version": "3.1.0",
- "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
"integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==",
"dev": true
},
@@ -1170,7 +1170,7 @@
"array-slice": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
- "integrity": "sha1-42jqFfibxwaff/uJrsOmx9SsItQ=",
+ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
"dev": true
},
"array-sort": {
@@ -1216,7 +1216,7 @@
"arraybuffer.slice": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
- "integrity": "sha1-O7xCdd1YTMGxCAm4nU6LY6aednU=",
+ "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==",
"dev": true
},
"asap": {
@@ -1269,7 +1269,7 @@
"async-limiter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
- "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=",
+ "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
"dev": true
},
"asynckit": {
@@ -2379,7 +2379,7 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
@@ -2459,7 +2459,7 @@
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
- "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"dev": true
},
"continuable-cache": {
@@ -2502,7 +2502,7 @@
"core-js": {
"version": "2.5.7",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz",
- "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=",
+ "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==",
"dev": true
},
"core-util-is": {
@@ -3425,7 +3425,7 @@
"doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
- "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
"dev": true,
"requires": {
"esutils": "^2.0.2"
@@ -3953,7 +3953,7 @@
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
@@ -3989,7 +3989,7 @@
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
@@ -4153,7 +4153,7 @@
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true
}
@@ -4248,7 +4248,7 @@
"eslint-scope": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz",
- "integrity": "sha1-UL8wcekzi83EMzF5Sgy1M/ATYXI=",
+ "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
@@ -4258,13 +4258,13 @@
"eslint-utils": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
- "integrity": "sha1-moUbqJ7nxGA0b5fPiTnHKYgn5RI=",
+ "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==",
"dev": true
},
"eslint-visitor-keys": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
- "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=",
+ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
"dev": true
},
"espree": {
@@ -4287,7 +4287,7 @@
"esquery": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
- "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=",
+ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
"dev": true,
"requires": {
"estraverse": "^4.0.0"
@@ -4296,7 +4296,7 @@
"esrecurse": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
- "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=",
+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
"dev": true,
"requires": {
"estraverse": "^4.1.0"
@@ -4356,7 +4356,7 @@
"eventemitter3": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz",
- "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=",
+ "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==",
"dev": true
},
"exec-buffer": {
@@ -4571,7 +4571,7 @@
"fill-range": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
- "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==",
+ "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=",
"dev": true,
"requires": {
"is-number": "^2.1.0",
@@ -5891,7 +5891,7 @@
"global-modules": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
- "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=",
+ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
"dev": true,
"requires": {
"global-prefix": "^1.0.1",
@@ -6461,7 +6461,7 @@
"gulp-eslint": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-5.0.0.tgz",
- "integrity": "sha1-KiaECV93Syz3kxAmIHjFbMehK1I=",
+ "integrity": "sha512-9GUqCqh85C7rP9120cpxXuZz2ayq3BZc85pCTuPJS03VQYxne0aWPIXWx6LSvsGPa3uRqtSO537vaugOh+5cXg==",
"dev": true,
"requires": {
"eslint": "^5.0.1",
@@ -7415,7 +7415,7 @@
"has-binary2": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
- "integrity": "sha1-d3asYn8+p3JQz8My2rfd9eT10R0=",
+ "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
"dev": true,
"requires": {
"isarray": "2.0.1"
@@ -7566,7 +7566,7 @@
"http-proxy": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz",
- "integrity": "sha1-etOElGWPhGBeL220Q230EPTlvpo=",
+ "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==",
"dev": true,
"requires": {
"eventemitter3": "^3.0.0",
@@ -7860,7 +7860,7 @@
"is-absolute": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
- "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=",
+ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
"dev": true,
"requires": {
"is-relative": "^1.0.0",
@@ -8155,7 +8155,7 @@
"is-relative": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
- "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=",
+ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
"dev": true,
"requires": {
"is-unc-path": "^1.0.0"
@@ -8164,7 +8164,7 @@
"is-resolvable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
- "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=",
+ "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==",
"dev": true
},
"is-retry-allowed": {
@@ -8212,7 +8212,7 @@
"is-unc-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
- "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=",
+ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
"dev": true,
"requires": {
"unc-path-regex": "^0.1.2"
@@ -8369,7 +8369,7 @@
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true
},
"json-stable-stringify-without-jsonify": {
@@ -8496,7 +8496,7 @@
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
@@ -9146,7 +9146,7 @@
"make-iterator": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
- "integrity": "sha1-KbM/MSqo9UfEpeSQ9Wr87JkTOtY=",
+ "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
"dev": true,
"requires": {
"kind-of": "^6.0.2"
@@ -9327,7 +9327,7 @@
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=",
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
"dev": true
},
"minimatch": {
@@ -12855,7 +12855,7 @@
"pluralize": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz",
- "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=",
+ "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==",
"dev": true
},
"posix-character-classes": {
@@ -13278,7 +13278,7 @@
},
"pretty-hrtime": {
"version": "1.0.3",
- "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
+ "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
"integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
"dev": true
},
@@ -13345,7 +13345,7 @@
"qjobs": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz",
- "integrity": "sha1-xF6cYYAL0IfviNfiVkI73Unl0HE=",
+ "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==",
"dev": true
},
"qs": {
@@ -13541,7 +13541,7 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
@@ -14039,7 +14039,7 @@
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true
},
"sax": {
@@ -14226,7 +14226,7 @@
"setprototypeof": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
- "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
"dev": true
},
"shebang-command": {
@@ -14516,7 +14516,7 @@
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
@@ -14796,7 +14796,7 @@
"stream-consume": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz",
- "integrity": "sha1-0721mMK9CugrjKx6xQsRB6eZbEg=",
+ "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==",
"dev": true
},
"stream-shift": {
@@ -14808,7 +14808,7 @@
"streamroller": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz",
- "integrity": "sha1-odG3z4PTmvsNYwSaWsv5NJO99ks=",
+ "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==",
"dev": true,
"requires": {
"date-format": "^1.2.0",
@@ -14835,7 +14835,7 @@
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
@@ -14850,7 +14850,7 @@
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
@@ -14867,7 +14867,7 @@
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
"is-fullwidth-code-point": "^2.0.0",
@@ -15409,7 +15409,7 @@
"tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=",
+ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"dev": true,
"requires": {
"os-tmpdir": "~1.0.2"
@@ -15573,7 +15573,7 @@
"type-is": {
"version": "1.6.16",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
- "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=",
+ "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
"dev": true,
"requires": {
"media-typer": "0.3.0",
@@ -15615,7 +15615,7 @@
"ultron": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
- "integrity": "sha1-n+FTahCmZKZSZqHjzPhf02MCvJw=",
+ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==",
"dev": true
},
"unc-path-regex": {
@@ -15777,13 +15777,13 @@
"upath": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz",
- "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=",
+ "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==",
"dev": true
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
- "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"dev": true,
"requires": {
"punycode": "^2.1.0"
@@ -15838,7 +15838,7 @@
"dependencies": {
"lru-cache": {
"version": "2.2.4",
- "resolved": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz",
"integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=",
"dev": true
}
@@ -16218,7 +16218,7 @@
"ws": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
- "integrity": "sha1-8c+E/i1ekB686U767OeF8YeiKPI=",
+ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
"dev": true,
"requires": {
"async-limiter": "~1.0.0",
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js
index b92f8c0807..891e8f0e7b 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umblogin.directive.js
@@ -178,7 +178,7 @@
function loginSubmit(login, password) {
- //TODO: Do validation properly like in the invite password update
+ // TODO: Do validation properly like in the invite password update
//if the login and password are not empty we need to automatically
// validate them - this is because if there are validation errors on the server
@@ -242,7 +242,7 @@
function requestPasswordResetSubmit(email) {
- //TODO: Do validation properly like in the invite password update
+ // TODO: Do validation properly like in the invite password update
if (email && email.length > 0) {
vm.requestPasswordResetForm.email.$setValidity('auth', true);
@@ -286,7 +286,7 @@
return;
}
- //TODO: All of this logic can/should be shared! We should do validation the nice way instead of all of this manual stuff, see: inviteSavePassword
+ // TODO: All of this logic can/should be shared! We should do validation the nice way instead of all of this manual stuff, see: inviteSavePassword
authResource.performSetPassword(vm.resetPasswordCodeInfo.resetCodeModel.userId, password, confirmPassword, vm.resetPasswordCodeInfo.resetCodeModel.resetCode)
.then(function () {
vm.showSetPasswordConfirmation = true;
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js
index 923cac80f5..8ad71226ba 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js
@@ -99,7 +99,7 @@ Use this directive to render an umbraco button. The directive can be used to gen
}
});
- //TODO: This doesn't seem necessary?
+ // TODO: This doesn't seem necessary?
UmbButtonController.$inject = ['$timeout', 'localizationService'];
function UmbButtonController($timeout, localizationService) {
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 60d44abfa5..79701414f7 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
@@ -305,8 +305,8 @@
var fieldControl = item.control;
var fieldErrorKeys = item.errorKeys;
- for (var i = 0; i < fieldErrorKeys.length; i++) {
- fieldControl.$setValidity(fieldErrorKeys[i], false);
+ for (var j = 0; j < fieldErrorKeys.length; j++) {
+ fieldControl.$setValidity(fieldErrorKeys[j], false);
}
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js
index 99d6b939e0..addbb3b11b 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js
@@ -8,7 +8,7 @@
templateUrl: 'views/components/content/umb-variant-content-editors.html',
bindings: {
page: "<",
- content: "<", //TODO: Not sure if this should be = since we are changing the 'active' property of a variant
+ content: "<", // TODO: Not sure if this should be = since we are changing the 'active' property of a variant
culture: "<",
onSelectApp: "&?"
},
@@ -232,6 +232,10 @@
var app = editor.content.apps[i];
if (app.alias === "umbContent") {
app.active = true;
+ // tell the world that the app has changed (but do it only once)
+ if (e === 0) {
+ selectApp(app);
+ }
}
else {
app.active = false;
@@ -239,7 +243,7 @@
}
}
- //TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular
+ // TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular
editor.collapsed = true;
editor.loading = true;
$timeout(function () {
@@ -251,7 +255,7 @@
/** Closes the split view */
function closeSplitView(editorIndex) {
- //TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular
+ // TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular
var editor = vm.editors[editorIndex];
editor.loading = true;
editor.collapsed = true;
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js
index d4b0fb158e..b7bcfa9eb4 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontainer.directive.js
@@ -46,7 +46,7 @@ Use this directive to construct a main content area inside the main editor windo
scope.numberOfOverlays = 0;
- //TODO: this shouldn't be a watch, this should be based on an event handler
+ // TODO: this shouldn't be a watch, this should be based on an event handler
scope.$watch(function () {
return overlayHelper.getNumberOfOverlays();
}, function (newValue) {
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js
index 6e75973ae7..77f2ffb54a 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/events/events.directive.js
@@ -188,7 +188,7 @@ angular.module('umbraco.directives')
e.stopPropagation();
var fn = $parse(attrs.onRightClick);
scope.$apply(function () {
- fn(scope, { $event: event });
+ fn(scope, { $event: e });
});
return false;
});
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js
index 372fb472fa..0a8846f975 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js
@@ -10,7 +10,7 @@ angular.module("umbraco.directives")
replace: true,
link: function (scope, element, attrs) {
- //TODO: A lot of the code below should be shared between the grid rte and the normal rte
+ // TODO: A lot of the code below should be shared between the grid rte and the normal rte
var promises = [];
@@ -73,7 +73,7 @@ angular.module("umbraco.directives")
});
- //TODO: Perhaps we should pin the toolbar for the rte always, regardless of if it's in the grid or not?
+ // TODO: Perhaps we should pin the toolbar for the rte always, regardless of if it's in the grid or not?
// this would mean moving this code into the tinyMceService.initializeEditor
//when we leave the editor (maybe)
@@ -116,7 +116,7 @@ angular.module("umbraco.directives")
loadTinyMce();
- //TODO: This should probably be in place for all RTE, not just for the grid, which means
+ // TODO: This should probably be in place for all RTE, not just for the grid, which means
// this code can live in tinyMceService.initializeEditor
var tabShownListener = eventsService.on("app.tabChange", function (e, args) {
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js
index a70b8ca33e..5732fa0eac 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js
@@ -131,7 +131,7 @@
function onDestroy() {
$(window).off('resize.umbImageGravity');
if (htmlOverlay) {
- //TODO: This should be destroyed but this will throw an exception:
+ // TODO: This should be destroyed but this will throw an exception:
// "cannot call methods on draggable prior to initialization; attempted to call method 'destroy'"
// I've tried lots of things and cannot get this to work, we weren't destroying before so hopefully
// there's no mem leaks?
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js
index ce816261d0..577ffe0176 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js
@@ -40,6 +40,13 @@
function setMediaLink(){
scope.nodeUrl = scope.node.mediaLink;
+ // grab the file name from the URL and use it as the display name in the file link
+ var match = /.*\/(.*)/.exec(scope.nodeUrl);
+ if (match) {
+ scope.nodeFileName = match[1];
+ } else {
+ scope.nodeFileName = scope.nodeUrl;
+ }
}
scope.openMediaType = function (mediaType) {
@@ -92,4 +99,4 @@
angular.module('umbraco.directives').directive('umbMediaNodeInfo', MediaNodeInfoDirective);
-})();
\ No newline at end of file
+})();
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js
index 927481952a..6c5fb86134 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlaybackdrop.directive.js
@@ -7,7 +7,7 @@
scope.numberOfOverlays = 0;
- //TODO: this shouldn't be a watch, this should be based on an event handler
+ // TODO: this shouldn't be a watch, this should be based on an event handler
scope.$watch(function () {
return overlayHelper.getNumberOfOverlays();
}, function (newValue) {
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js
index 052f497ee9..c3243993c1 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js
@@ -80,7 +80,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use
// entire tree again since we already still have it in memory. Of course if the section is different we will
// reload it. This saves a lot on processing if someone is navigating in and out of the same section many times
// since it saves on data retreival and DOM processing.
- //TODO: This isn't used!?
+ // TODO: This isn't used!?
var lastSection = "";
/** Helper function to emit tree events */
@@ -92,7 +92,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use
}
}
- //TODO: This isn't used!?
+ // TODO: This isn't used!?
function clearCache(section) {
treeService.clearCache({ section: section });
}
@@ -300,7 +300,7 @@ function umbTreeDirective($q, $rootScope, treeService, notificationsService, use
return '';
}
- //TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time
+ // TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time
// it would be better if we could cache the processing. The problem is that some of these things are dynamic.
var css = [];
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js
index 4440ceeb4b..19ecdaf8d9 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js
@@ -61,7 +61,7 @@ angular.module("umbraco.directives")
return '';
}
- //TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time
+ // TODO: This is called constantly because as a method in a template it's re-evaluated pretty much all the time
// it would be better if we could cache the processing. The problem is that some of these things are dynamic.
var css = [];
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js
index 1f396ab6c2..79b29b407b 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbflatpickr.directive.js
@@ -92,20 +92,25 @@ Use this directive to render a date time picker
}
};
- function umbFlatpickrCtrl($element, $timeout, $scope, assetsService) {
+ function umbFlatpickrCtrl($element, $timeout, $scope, assetsService, userService) {
var ctrl = this;
var loaded = false;
+ var userLocale = null;
ctrl.$onInit = function() {
// load css file for the date picker
- assetsService.loadCss('lib/flatpickr/flatpickr.css', $scope);
+ assetsService.loadCss('lib/flatpickr/flatpickr.css', $scope).then(function () {
+ userService.getCurrentUser().then(function (user) {
+ // init date picker
+ userLocale = user.locale;
+ if (userLocale.indexOf('-') > -1) {
+ userLocale = userLocale.split('-')[0];
+ }
+ loaded = true;
+ grabElementAndRunFlatpickr();
- // load the js file for the date picker
- assetsService.loadJs('lib/flatpickr/flatpickr.js', $scope).then(function () {
- // init date picker
- loaded = true;
- grabElementAndRunFlatpickr();
+ });
});
};
@@ -128,6 +133,10 @@ Use this directive to render a date time picker
setUpCallbacks();
+ if (!ctrl.options.locale) {
+ ctrl.options.locale = userLocale;
+ }
+
var fpInstance = new fpLib(element, ctrl.options);
if (ctrl.onSetup) {
@@ -228,4 +237,4 @@ Use this directive to render a date time picker
angular.module('umbraco.directives').component('umbFlatpickr', umbFlatpickr);
-})();
\ No newline at end of file
+})();
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js
index 11c94d04c0..15f5a1d46a 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js
@@ -301,7 +301,7 @@
//based on the selection, we need to filter the available composite types list
filterAvailableCompositions(selectedContentType, newSelection).then(function () {
- //TODO: Here we could probably re-enable selection if we previously showed a throbber or something
+ // TODO: Here we could probably re-enable selection if we previously showed a throbber or something
});
});
}
@@ -311,7 +311,7 @@
//based on the selection, we need to filter the available composite types list
filterAvailableCompositions(selectedContentType, newSelection).then(function () {
- //TODO: Here we could probably re-enable selection if we previously showed a throbber or something
+ // TODO: Here we could probably re-enable selection if we previously showed a throbber or something
});
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js
index 7ace23a988..e5bdd3ca78 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbpropertyfileupload.directive.js
@@ -92,7 +92,7 @@
vm.culture = null;
}
- //TODO: need to figure out what we can do for things like Nested Content
+ // TODO: need to figure out what we can do for things like Nested Content
var existingClientFiles = checkPendingClientFiles();
//create the property to show the list of files currently saved
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js
index 7cc109a5c0..f8dbefa5d7 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/users/changepassword.directive.js
@@ -135,7 +135,7 @@
!$scope.config.enablePasswordRetrieval && !$scope.showReset;
};
- //TODO: I don't think we need this or the cancel button, this can be up to the editor rendering this directive
+ // TODO: I don't think we need this or the cancel button, this can be up to the editor rendering this directive
$scope.showCancelBtn = function () {
return $scope.config.disableToggle !== true && $scope.config.hasPassword;
};
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js
index 5568b4b276..9ee83dc2ba 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js
@@ -42,12 +42,12 @@ function valPropertyMsg(serverValidationManager) {
return err.errorMsg;
}
else {
- //TODO: localize
+ // TODO: localize
return scope.currentProperty.propertyErrorMessage ? scope.currentProperty.propertyErrorMessage : "Property has errors";
}
}
- //TODO: localize
+ // TODO: localize
return "Property has errors";
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js
index d5a21e0ba6..524b5f7efe 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valsubview.directive.js
@@ -15,7 +15,7 @@
return {
valStatusChanged: function (args) {
- //TODO: Verify this is correct, does $scope.model ever exist?
+ // TODO: Verify this is correct, does $scope.model ever exist?
if ($scope.model) {
if (!args.form.$valid) {
var subViewContent = $element.find(".ng-invalid");
diff --git a/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js b/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js
index 7582db6740..e19fabfe61 100644
--- a/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js
+++ b/src/Umbraco.Web.UI.Client/src/common/mocks/resources/dashboard.mocks.js
@@ -8,7 +8,7 @@ angular.module('umbraco.mocks').
return [401, null, null];
}
else {
- //TODO: return real mocked data
+ // TODO: return real mocked data
return [200, [], null];
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js
index 4f9b9a21f8..678cffe42e 100644
--- a/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js
+++ b/src/Umbraco.Web.UI.Client/src/common/resources/auth.resource.js
@@ -130,7 +130,7 @@ function authResource($q, $http, umbRequestHelper, angularHelper) {
});
}
- //TODO: This validation shouldn't really be done here, the validation on the login dialog
+ // TODO: This validation shouldn't really be done here, the validation on the login dialog
// is pretty hacky which is why this is here, ideally validation on the login dialog would
// be done properly.
var emailRegex = /\S+@\S+\.\S+/;
diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js
index fbd54433d7..15460a3356 100644
--- a/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js
+++ b/src/Umbraco.Web.UI.Client/src/common/resources/javascriptlibrary.resource.js
@@ -8,17 +8,17 @@
**/
function javascriptLibraryResource($q, $http, umbRequestHelper) {
- var existingLocales = [];
+ var existingLocales = null;
- function getSupportedLocalesForMoment() {
+ function getSupportedLocales() {
var deferred = $q.defer();
- if (existingLocales.length === 0) {
+ if (existingLocales === null) {
umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"backOfficeAssetsApiBaseUrl",
- "GetSupportedMomentLocales")),
+ "GetSupportedLocales")),
"Failed to get cultures").then(function(locales) {
existingLocales = locales;
deferred.resolve(existingLocales);
@@ -29,9 +29,9 @@
return deferred.promise;
}
-
+
var service = {
- getSupportedLocalesForMoment: getSupportedLocalesForMoment
+ getSupportedLocales: getSupportedLocales
};
return service;
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js b/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js
index 86d5510ca4..9b1d92f2b0 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js
@@ -358,7 +358,7 @@ angular.module('umbraco.services').factory("editorState", function() {
}
};
- //TODO: This shouldn't be removed! use getCurrent() method instead of a hacked readonly property which is confusing.
+ // TODO: This shouldn't be removed! use getCurrent() method instead of a hacked readonly property which is confusing.
//create a get/set property but don't allow setting
Object.defineProperty(state, "current", {
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js b/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js
index 27e055a7d3..81e439a9bb 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/assets.service.js
@@ -66,20 +66,26 @@ angular.module('umbraco.services')
}
function getMomentLocales(locales, supportedLocales) {
+ return getLocales(locales, supportedLocales, 'lib/moment/');
+ }
+ function getFlatpickrLocales(locales, supportedLocales) {
+ return getLocales(locales, supportedLocales, 'lib/flatpickr/l10n/');
+ }
+
+ function getLocales(locales, supportedLocales, path) {
var localeUrls = [];
var locales = locales.split(',');
for (var i = 0; i < locales.length; i++) {
var locale = locales[i].toString().toLowerCase();
if (locale !== 'en-us') {
-
if (supportedLocales.indexOf(locale + '.js') > -1) {
- localeUrls.push('lib/moment/' + locale + '.js');
+ localeUrls.push(path + locale + '.js');
}
if (locale.indexOf('-') > -1) {
var majorLocale = locale.split('-')[0] + '.js';
if (supportedLocales.indexOf(majorLocale) > -1) {
- localeUrls.push('lib/moment/' + majorLocale);
+ localeUrls.push(path + majorLocale);
}
}
}
@@ -89,12 +95,13 @@ angular.module('umbraco.services')
}
/**
- * Loads specific Moment.js Locales.
+ * Loads specific Moment.js and Flatpickr Locales.
* @param {any} locales
* @param {any} supportedLocales
*/
function loadLocales(locales, supportedLocales) {
- var localeUrls = getMomentLocales(locales, supportedLocales);
+ var localeUrls = getMomentLocales(locales, supportedLocales.moment);
+ localeUrls = localeUrls.concat(getFlatpickrLocales(locales, supportedLocales.flatpickr));
if (localeUrls.length >= 1) {
return service.load(localeUrls, $rootScope);
}
@@ -104,12 +111,12 @@ angular.module('umbraco.services')
}
/**
- * Loads in moment.js requirements during the _loadInitAssets call
+ * Loads in locale requirements during the _loadInitAssets call
*/
- function loadMomentLocaleForCurrentUser() {
+ function loadLocaleForCurrentUser() {
userService.getCurrentUser().then(function (currentUser) {
- return javascriptLibraryResource.getSupportedLocalesForMoment().then(function (supportedLocales) {
+ return javascriptLibraryResource.getSupportedLocales().then(function (supportedLocales) {
return loadLocales(currentUser.locale, supportedLocales);
});
});
@@ -141,7 +148,7 @@ angular.module('umbraco.services')
var self = this;
return self.loadJs(umbRequestHelper.getApiUrl("serverVarsJs", "", ""), $rootScope).then(function () {
initAssetsLoaded = true;
- return loadMomentLocaleForCurrentUser();
+ return loadLocaleForCurrentUser();
});
}
else {
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js
index 1258ec4099..b9bc4eb499 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/contenteditinghelper.service.js
@@ -35,7 +35,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
return {
/** Used by the content editor and mini content editor to perform saving operations */
- //TODO: Make this a more helpful/reusable method for other form operations! we can simplify this form most forms
+ // TODO: Make this a more helpful/reusable method for other form operations! we can simplify this form most forms
// = this is already done in the formhelper service
contentEditorPerformSave: function (args) {
if (!angular.isObject(args)) {
@@ -421,7 +421,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
*/
reBindChangedProperties: function (origContent, savedContent) {
- //TODO: We should probably split out this logic to deal with media/members separately to content
+ // TODO: We should probably split out this logic to deal with media/members separately to content
//a method to ignore built-in prop changes
var shouldIgnore = function (propName) {
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js
index 191e0a22c0..b6bcafbddf 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/formhelper.service.js
@@ -121,7 +121,7 @@ function formHelper(angularHelper, serverValidationManager, notificationsService
}
else {
- //TODO: All YSOD handling should be done with an interceptor
+ // TODO: All YSOD handling should be done with an interceptor
overlayService.ysod(err);
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js
index a57fd606aa..0fa2d0df1a 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/iconhelper.service.js
@@ -56,7 +56,7 @@ function iconHelper($q, $timeout) {
{ oldIcon: ".sprTreeSettingDataType", newIcon: "icon-autofill" },
- //TODO:
+ // TODO: Something needs to be done with the old tree icons that are commented out.
/*
{ oldIcon: ".sprTreeSettingAgent", newIcon: "" },
{ oldIcon: ".sprTreeSettingCss", newIcon: "" },
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js b/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js
index 1b7a6da764..2a9afdfa94 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js
@@ -24,7 +24,7 @@
angular.module('umbraco.services')
.factory('localizationService', function ($http, $q, eventsService, $window, $filter, userService) {
- //TODO: This should be injected as server vars
+ // TODO: This should be injected as server vars
var url = "LocalizedText";
var resourceFileLoadStatus = "none";
var resourceLoadingPromise = [];
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js
index 5db9e9c77e..16c5b38a79 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js
@@ -66,7 +66,7 @@ function mediaHelper(umbRequestHelper) {
});
//for now we'll just return the first image in the collection.
- //TODO: we should enable returning many to be displayed in the picker if the uploader supports many.
+ // TODO: we should enable returning many to be displayed in the picker if the uploader supports many.
if (mediaVal.length && mediaVal.length > 0) {
if (!options.imageOnly || (options.imageOnly === true && mediaVal[0].isImage)) {
return mediaVal[0].file;
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js
index 7e0e1db24f..a347279fdb 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/mediatypehelper.service.js
@@ -22,7 +22,7 @@ function mediaTypeHelper(mediaTypeResource, $q) {
getAllowedImagetypes: function (mediaId){
- //TODO: This is horribly inneficient - why make one request per type!?
+ // TODO: This is horribly inneficient - why make one request per type!?
//This should make a call to c# to get exactly what it's looking for instead of returning every single media type and doing
//some filtering on the client side.
//This is also called multiple times when it's not needed! Example, when launching the media picker, this will be called twice
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js
index f0a3239602..04c431767c 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js
@@ -151,7 +151,7 @@ angular.module('umbraco.services')
},
- //TODO: This doesn't do anything!
+ // TODO: This doesn't do anything!
setCurrent: function (sectionAlias) {
var currentSection = sectionAlias;
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
index 97d939bac1..896a360814 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
@@ -680,7 +680,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
//supported keys to move to the next or prev element (13-enter, 27-esc, 38-up, 40-down, 39-right, 37-left)
//supported keys to remove the macro (8-backspace, 46-delete)
- //TODO: Should we make the enter key insert a line break before or leave it as moving to the next element?
+ // TODO: Should we make the enter key insert a line break before or leave it as moving to the next element?
if ($.inArray(e.keyCode, [13, 40, 39]) !== -1) {
//move to next element
moveSibling(macroElement, true);
@@ -1294,7 +1294,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
self.createLinkPicker(args.editor, function (currentTarget, anchorElement) {
var linkPicker = {
currentTarget: currentTarget,
- anchors: self.getAnchorNames(JSON.stringify(editorState.current.properties)),
+ anchors: editorState.current ? self.getAnchorNames(JSON.stringify(editorState.current.properties)) : [],
submit: function (model) {
self.insertLinkInEditor(args.editor, model.target, anchorElement);
editorService.close();
@@ -1358,7 +1358,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
self.createAceCodeEditor(args.editor, function () {
- //TODO: CHECK TO SEE WHAT WE NEED TO DO WIT MACROS (See code block?)
+ // TODO: CHECK TO SEE WHAT WE NEED TO DO WIT MACROS (See code block?)
/*
var html = editor.getContent({source_view: true});
html = html.replace(/]*)>([^<]*)<\/span>/gm, String.fromCharCode(chr));
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js
index 28ac7f6485..e102da5d34 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/tour.service.js
@@ -114,7 +114,7 @@
* @returns {Object} Returns the current tour
*/
function getCurrentTour() {
- //TODO: This should be reset if a new user logs in
+ // TODO: This should be reset if a new user logs in
return currentTour;
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js
index 1e6fc5d643..cbe9b561a0 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js
@@ -66,7 +66,7 @@
'alias', 'description', 'thumbnail', 'name', 'id', 'icon', 'trashed',
'key', 'parentId', 'alias', 'path', 'allowCultureVariant', 'isElement');
- //TODO: Map these
+ // TODO: Map these
saveModel.allowedTemplates = _.map(displayModel.allowedTemplates, function (t) { return t.alias; });
saveModel.defaultTemplate = displayModel.defaultTemplate ? displayModel.defaultTemplate.alias : null;
var realGroups = _.reject(displayModel.groups, function (g) {
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js
index fb1a1b8d5e..6991c5d386 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js
@@ -177,7 +177,7 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe
//show a ysod dialog
if (Umbraco.Sys.ServerVariables["isDebuggingEnabled"] === true) {
const error = { errorMsg: 'An error occured', data: response.data };
- //TODO: All YSOD handling should be done with an interceptor
+ // TODO: All YSOD handling should be done with an interceptor
overlayService.ysod(error);
}
else {
@@ -270,7 +270,7 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe
formHelper.showNotifications(response.data);
}
- //TODO: Do we need to pass the result through umbDataFormatter.formatContentGetData? Right now things work so not sure but we should check
+ // TODO: Do we need to pass the result through umbDataFormatter.formatContentGetData? Right now things work so not sure but we should check
//the data returned is the up-to-date data so the UI will refresh
return $q.resolve(response.data);
@@ -289,7 +289,7 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe
else if (Umbraco.Sys.ServerVariables["isDebuggingEnabled"] === true) {
//show a ysod dialog
const error = { errorMsg: 'An error occured', data: response.data };
- //TODO: All YSOD handling should be done with an interceptor
+ // TODO: All YSOD handling should be done with an interceptor
overlayService.ysod(error);
}
else {
diff --git a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js
index e023c6d23c..96f3115185 100644
--- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js
@@ -137,7 +137,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
navigationService.showSearch();
});
- ////TODO: remove this it's not a thing
+ //// TODO: remove this it's not a thing
//$scope.selectedId = navigationService.currentId;
var evts = [];
@@ -423,7 +423,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
var path = treeService.getPath(currNode);
promises.push($scope.treeApi.syncTree({ path: path, activate: true }));
}
- //TODO: If we want to keep all paths expanded ... but we need more testing since we need to deal with unexpanding
+ // TODO: If we want to keep all paths expanded ... but we need more testing since we need to deal with unexpanding
//for (var i = 0; i < expandedPaths.length; i++) {
// promises.push($scope.treeApi.syncTree({ path: expandedPaths[i], activate: false, forceReload: true }));
//}
@@ -441,16 +441,16 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
};
//this reacts to the options item in the tree
- //TODO: migrate to nav service
- //TODO: is this used?
+ // TODO: migrate to nav service
+ // TODO: is this used?
$scope.searchShowMenu = function (ev, args) {
//always skip default
args.skipDefault = true;
navigationService.showMenu(args);
};
- //TODO: migrate to nav service
- //TODO: is this used?
+ // TODO: migrate to nav service
+ // TODO: is this used?
$scope.searchHide = function () {
navigationService.hideSearch();
};
diff --git a/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js b/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js
index cdf5f8c980..3dbc4e119b 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/installer/installer.controller.js
@@ -1,7 +1,7 @@
angular.module("umbraco.install").controller("Umbraco.InstallerController",
function ($scope, installerService) {
- //TODO: Decouple the service from the controller - the controller should be responsible
+ // TODO: Decouple the service from the controller - the controller should be responsible
// for the model (state) and the service should be responsible for helping the controller,
// the controller should be passing the model into it's methods for manipulation and not hold
// state. We should not be assigning properties from a service to a controller's scope.
diff --git a/src/Umbraco.Web.UI.Client/src/less/application/grid.less b/src/Umbraco.Web.UI.Client/src/less/application/grid.less
index a7b4bd0011..073d1b5721 100644
--- a/src/Umbraco.Web.UI.Client/src/less/application/grid.less
+++ b/src/Umbraco.Web.UI.Client/src/less/application/grid.less
@@ -41,9 +41,9 @@ body {
#mainwrapper {
position: absolute;
- top: 0;
- left: 0;
- right: 0;
+ top: 0;
+ left: 0;
+ right: 0;
bottom: 0;
margin: 0;
}
@@ -56,10 +56,10 @@ body.umb-drawer-is-visible #mainwrapper{
position: absolute;
top: 0px;
bottom: 0px;
- right: 0px;
+ right: 0px;
left: 0px;
z-index: 10;
- margin: 0
+ margin: 0;
}
#umb-notifications-wrapper {
@@ -151,17 +151,23 @@ body.umb-drawer-is-visible #mainwrapper{
}
.ui-resizable-e {
- cursor: e-resize;
- width: 4px;
+ cursor: col-resize;
+ width: 10px;
right: -5px;
top: 0;
bottom: 0;
- background-color: @gray-10;
- border: solid 1px @purple-l3;
- border-top: none;
- border-bottom: none;
position:absolute;
z-index:9999 !important;
+
+ &:hover::after {
+ content: '';
+ position: absolute;
+ background-color: @gray-8;
+ top: 0;
+ bottom: 0;
+ width: 1px;
+ right: 5px;
+ }
}
@media (min-width: 1101px) {
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less
index 26347c8501..2d1cbd10ff 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/html/umb-expansion-panel.less
@@ -13,6 +13,10 @@
cursor: pointer;
justify-content: space-between;
color: @black;
+
+ &:hover .umb-expansion-panel__expand {
+ color: @gray-6;
+ }
}
.umb-expansion-panel__expand {
@@ -22,4 +26,4 @@
.umb-expansion-panel__content {
padding: 20px;
border-top: 1px solid @gray-9;
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less b/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less
index 6528c2120e..77eba94b6d 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/tooltip/umb-tooltip.less
@@ -10,4 +10,5 @@
animation-timing-function: ease-in;
animation: fadeIn;
margin-top: 15px;
+ pointer-events: none;
}
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less
index bd493cf0d3..38860e6d22 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-tree.less
@@ -15,7 +15,7 @@
outline: none;
text-decoration: none;
- // TODO => confirm not in use
+ // TODO: => confirm not in use
// &.noSpr {
// background-position: 0
// }
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less
index 63a0856c84..399a367dc5 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-content-grid.less
@@ -53,7 +53,7 @@
display: inline-flex;
}
-.umb-content-grid__item-name:hover {
+.umb-content-grid__item-name:hover span {
text-decoration: underline;
}
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less
index a4c744bf7f..9dc6aa1906 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less
@@ -1,4 +1,4 @@
-// TODO General cleanup in !important (Round 2)
+// TODO: General cleanup in !important (Round 2)
// Gridview
// -------------------------
diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less
index e3350b4956..f9bb860b5e 100644
--- a/src/Umbraco.Web.UI.Client/src/less/forms.less
+++ b/src/Umbraco.Web.UI.Client/src/less/forms.less
@@ -368,7 +368,7 @@ textarea {
}
// Radios and checkboxes on same line
-// TODO v3: Convert .inline to .control-inline
+// TODO: v3: Convert .inline to .control-inline
.radio.inline,
.checkbox.inline {
display: inline-block;
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dashboard.html b/src/Umbraco.Web.UI.Client/src/views/common/dashboard.html
index 6453963670..c3b60e2f0a 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/dashboard.html
+++ b/src/Umbraco.Web.UI.Client/src/views/common/dashboard.html
@@ -17,16 +17,15 @@
-
+
-
+
-
{{property.caption}}
-
+
-
+
-
+
@@ -34,5 +33,5 @@
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js
index 346bddf00f..4a43c340db 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/treepicker/treepicker.controller.js
@@ -63,7 +63,7 @@ angular.module("umbraco").controller("Umbraco.Editors.TreePickerController",
function initDialogTree() {
vm.dialogTreeApi.callbacks.treeLoaded(treeLoadedHandler);
- //TODO: Also deal with unexpanding!!
+ // TODO: Also deal with unexpanding!!
vm.dialogTreeApi.callbacks.treeNodeExpanded(nodeExpandedHandler);
vm.dialogTreeApi.callbacks.treeNodeSelect(nodeSelectHandler);
}
@@ -111,7 +111,7 @@ angular.module("umbraco").controller("Umbraco.Editors.TreePickerController",
}
}
- //TODO: Seems odd this logic is here, i don't think it needs to be and should just exist on the property editor using this
+ // TODO: Seems odd this logic is here, i don't think it needs to be and should just exist on the property editor using this
if ($scope.model.minNumber) {
$scope.model.minNumber = parseInt($scope.model.minNumber, 10);
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html b/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html
index 4004c2b958..f411437b1d 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/media/umb-media-node-info.html
@@ -14,7 +14,7 @@
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js
index 2bde680bf4..2a3f67a7e3 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/content/apps/content/content.controller.js
@@ -26,7 +26,7 @@
if (newVal !== oldVal) {
vm.loading = true;
- //TODO: Can we minimize the flicker?
+ // TODO: Can we minimize the flicker?
$timeout(function () {
onInit();
}, 100);
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js
index e594bae2f4..56ce67a0dc 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/content/content.delete.controller.js
@@ -65,7 +65,7 @@ function ContentDeleteController($scope, $timeout, contentResource, treeService,
//check if response is ysod
if (err.status && err.status >= 500) {
- //TODO: All YSOD handling should be done with an interceptor
+ // TODO: All YSOD handling should be done with an interceptor
overlayService.ysod(err);
}
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js
index 9074834ee6..82432ba78d 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js
@@ -27,7 +27,7 @@
//and it's not publishable or not selected to be published
//then we cannot continue
- //TODO: Show a message when this occurs
+ // TODO: Show a message when this occurs
return false;
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js
index c2ffbced04..0ca2fe65c9 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js
@@ -69,7 +69,7 @@
//and not flagged for saving
//then we cannot continue
- //TODO: Show a message when this occurs
+ // TODO: Show a message when this occurs
return false;
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js
index 6991a7b509..d97bfc77b1 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js
@@ -333,7 +333,7 @@
//and it's not publishable or not selected to be published
//then we cannot continue
- //TODO: Show a message when this occurs
+ // TODO: Show a message when this occurs
return false;
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js
index cc5e4b32a9..80c716732e 100644
--- a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/delete.controller.js
@@ -18,7 +18,7 @@ function ContentBlueprintDeleteController($scope, contentResource, treeService,
$scope.currentNode.loading = false;
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js
index 9cef913e79..8206d0a114 100644
--- a/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/content/redirecturls.controller.js
@@ -2,12 +2,11 @@
"use strict";
function RedirectUrlsController($scope, redirectUrlsResource, notificationsService, localizationService, $q) {
- //...todo
- //search by url or url part
- //search by domain
- //display domain in dashboard results?
+ // TODO: search by url or url part
+ // TODO: search by domain
+ // TODO: display domain in dashboard results?
- //used to cancel any request in progress if another one needs to take it's place
+ // used to cancel any request in progress if another one needs to take it's place
var vm = this;
var canceler = null;
diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js
index a5e4125742..10037db166 100644
--- a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/examinemanagement.controller.js
@@ -148,8 +148,8 @@ function ExamineManagementController($scope, umbRequestHelper, $http, $q, $timeo
'Failed to rebuild index')
.then(function() {
- //rebuilding has started, nothing is returned accept a 200 status code.
- //lets poll to see if it is done.
+ // rebuilding has started, nothing is returned accept a 200 status code.
+ // lets poll to see if it is done.
$timeout(() => { checkProcessing(index, "PostCheckRebuildIndex"), 1000 });
});
@@ -157,7 +157,7 @@ function ExamineManagementController($scope, umbRequestHelper, $http, $q, $timeo
}
function init() {
- //go get the data
+ // go get the data
//combine two promises and execute when they are both done
$q.all([
diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js
index 6cce37943e..15e1a9402e 100644
--- a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js
@@ -32,7 +32,7 @@ function DataTypeCreateController($scope, $location, navigationService, dataType
}, function(err) {
- //TODO: Handle errors
+ // TODO: Handle errors
});
};
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js
index 101d74b16b..470e9b5f1e 100644
--- a/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/datatype.delete.controller.js
@@ -18,7 +18,7 @@ function DataTypeDeleteController($scope, dataTypeResource, treeService, navigat
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
@@ -35,7 +35,7 @@ function DataTypeDeleteController($scope, dataTypeResource, treeService, navigat
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js
index c920e05480..d7d8082048 100644
--- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/delete.controller.js
@@ -18,7 +18,7 @@ function DocumentTypesDeleteController($scope, dataTypeResource, contentTypeReso
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
@@ -35,7 +35,7 @@ function DocumentTypesDeleteController($scope, dataTypeResource, contentTypeReso
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js
index 317fe094ae..a3b422e4f3 100644
--- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js
@@ -38,13 +38,12 @@
});
contentTypeResource.getAll().then(function(contentTypes){
-
- vm.contentTypes = contentTypes;
+ vm.contentTypes = _.where(contentTypes, {isElement: false});
// convert legacy icons
iconHelper.formatContentTypeIcons(vm.contentTypes);
- vm.selectedChildren = contentTypeHelper.makeObjectArrayFromId($scope.model.allowedContentTypes, vm.contentTypes);
+ vm.selectedChildren = contentTypeHelper.makeObjectArrayFromId($scope.model.allowedContentTypes, contentTypes);
if($scope.model.id === 0) {
contentTypeHelper.insertChildNodePlaceholder(vm.contentTypes, $scope.model.name, $scope.model.icon, $scope.model.id);
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js
index 70b5120ebe..ab057f87a4 100644
--- a/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js
@@ -59,7 +59,7 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
//check if response is ysod
if (err.status && err.status >= 500) {
- //TODO: All YSOD handling should be done with an interceptor
+ // TODO: All YSOD handling should be done with an interceptor
overlayService.ysod(err);
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js
index 785550684b..f4b61d55dd 100644
--- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/delete.controller.js
@@ -18,7 +18,7 @@ function MediaTypesDeleteController($scope, dataTypeResource, mediaTypeResource,
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
@@ -35,7 +35,7 @@ function MediaTypesDeleteController($scope, dataTypeResource, mediaTypeResource,
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js
index 22deb6df4b..7e434b6f3b 100644
--- a/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/membergroups/delete.controller.js
@@ -18,7 +18,7 @@ function MemberGroupsDeleteController($scope, memberGroupResource, treeService,
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js
index af2457d099..adf6cbc8a6 100644
--- a/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/membertypes/create.controller.js
@@ -35,7 +35,7 @@ function MemberTypesCreateController($scope, $location, navigationService, membe
}, function(err) {
- //TODO: Handle errors
+ // TODO: Handle errors
});
};
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js
index c0cd0c8598..8b8c966790 100644
--- a/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/membertypes/delete.controller.js
@@ -18,7 +18,7 @@ function MemberTypesDeleteController($scope, memberTypeResource, treeService, na
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js
index 02b89dd279..17e7fa1bd9 100644
--- a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/delete.controller.js
@@ -18,7 +18,7 @@ function PartialViewMacrosDeleteController($scope, codefileResource, treeService
$scope.currentNode.loading = false;
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js
index 1e615ad0d4..a848b77a82 100644
--- a/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/partialviews/delete.controller.js
@@ -21,7 +21,7 @@ function PartialViewsDeleteController($scope, codefileResource, treeService, nav
$scope.currentNode.loading = false;
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
}, function (err) {
diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html
index 4146ba0763..739ef11226 100644
--- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html
+++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/valuetype.html
@@ -2,6 +2,8 @@
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js
index 79ae34ea21..d6fe709962 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js
@@ -12,7 +12,7 @@ function ColorPickerController($scope) {
//map back to the model
$scope.model.config = config;
- //TODO: This isn't used
+ // TODO: This isn't used
function convertArrayToDictionaryArray(model) {
//now we need to format the items in the dictionary because we always want to have an array
var newItems = [];
@@ -23,7 +23,7 @@ function ColorPickerController($scope) {
return newItems;
}
- //TODO: This isn't used
+ // TODO: This isn't used
function convertObjectToDictionaryArray(model) {
//now we need to format the items in the dictionary because we always want to have an array
var newItems = [];
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
index 1e7e3fa0ed..a3fc33d2ea 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
@@ -766,7 +766,7 @@ function listViewController($scope, $routeParams, $injector, $timeout, currentUs
case "published":
return "content_isPublished";
case "contentTypeAlias":
- //TODO: Check for members
+ // TODO: Check for members
return $scope.entityType === "content" ? "content_documentType" : "content_mediatype";
case "email":
return "general_email";
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js
index 67a5630909..f05b1e31d8 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/markdowneditor/markdowneditor.controller.js
@@ -69,7 +69,7 @@ function MarkdownEditorController($scope, $element, assetsService, editorService
}, 200);
});
- //load the seperat css for the editor to avoid it blocking our js loading TEMP HACK
+ // HACK: load the separate css for the editor to avoid it blocking our js loading TEMP HACK
assetsService.loadCss("lib/markdown/markdown.css", $scope);
})
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html
index ca79c7faa0..0d1c736438 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html
@@ -13,7 +13,7 @@
allow-remove="true"
allow-edit="true"
on-remove="remove($index)"
- on-edit="openContentEditor(link, $index)">
+ on-edit="openLinkPicker(link, $index)">
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js
index d6cc35bacd..884b661beb 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js
@@ -300,7 +300,7 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
function (property) {
if (_.find(notSupported, function (x) { return x === property.editor; })) {
property.notSupported = true;
- //TODO: Not supported message to be replaced with 'content_nestedContentEditorNotSupported' dictionary key. Currently not possible due to async/timing quirk.
+ // TODO: Not supported message to be replaced with 'content_nestedContentEditorNotSupported' dictionary key. Currently not possible due to async/timing quirk.
property.notSupportedMessage = "Property " + property.label + " uses editor " + property.editor + " which is not supported by Nested Content.";
}
});
@@ -433,7 +433,7 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
unsubscribe();
});
- //TODO: Move this into a shared location?
+ // TODO: Move this into a shared location?
var UUID = (function () {
var self = {};
var lut = []; for (var i = 0; i < 256; i++) { lut[i] = (i < 16 ? '0' : '') + (i).toString(16); }
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js
index b795c49855..f455e99fe7 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/codeeditor.controller.js
@@ -32,7 +32,7 @@
// set default title
if(!$scope.model.title) {
- // TODO localize
+ // TODO: localize
$scope.model.title = "Edit source code";
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
index 2181361470..960e66edfe 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
@@ -2,7 +2,7 @@ angular.module("umbraco")
.controller("Umbraco.PropertyEditors.RTEController",
function ($scope, $q, assetsService, $timeout, tinyMceService, angularHelper, editorService, macroService, editorState) {
- //TODO: A lot of the code below should be shared between the grid rte and the normal rte
+ // TODO: A lot of the code below should be shared between the grid rte and the normal rte
$scope.isLoading = true;
diff --git a/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js
index 82c11a2242..4757399224 100644
--- a/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/scripts/delete.controller.js
@@ -18,7 +18,7 @@ function ScriptsDeleteController($scope, codefileResource, treeService, navigati
$scope.currentNode.loading = false;
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
});
diff --git a/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js
index 62c5ace83a..2ca93fba4c 100644
--- a/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/scripts/edit.controller.js
@@ -145,7 +145,7 @@
//As conflicts with our own tree search shortcut
_editor.commands.bindKey("ctrl-space", null);
- //TODO: Move all these keybinding config out into some helper/service
+ // TODO: Move all these keybinding config out into some helper/service
_editor.commands.addCommands([
//Disable (alt+shift+K)
//Conflicts with our own show shortcuts dialog - this overrides it
diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js
index b37b16d4d6..6033a6bdc7 100644
--- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.controller.js
@@ -1,7 +1,7 @@
(function () {
"use strict";
- function StyleSheetsCreateController($scope, $location, navigationService) {
+ function StyleSheetsCreateController($scope, $location, navigationService, formHelper, codefileResource) {
var vm = this;
var node = $scope.currentNode;
@@ -9,6 +9,9 @@
vm.createFile = createFile;
vm.createRichtextStyle = createRichtextStyle;
vm.close = close;
+ vm.creatingFolder = false;
+ vm.showCreateFolder = showCreateFolder;
+ vm.createFolder = createFolder;
function createFile() {
$location.path("/settings/stylesheets/edit/" + node.id).search("create", "true");
@@ -19,6 +22,36 @@
$location.path("/settings/stylesheets/edit/" + node.id).search("create", "true").search("rtestyle", "true");
navigationService.hideMenu();
}
+
+ function showCreateFolder() {
+ vm.creatingFolder = true;
+ }
+
+ function createFolder(form) {
+
+ if (formHelper.submitForm({scope: $scope, formCtrl: form })) {
+
+ codefileResource.createContainer("stylesheets", node.id, vm.folderName).then(function (saved) {
+
+ navigationService.hideMenu();
+
+ navigationService.syncTree({
+ tree: "stylesheets",
+ path: saved.path,
+ forceReload: true,
+ activate: true
+ });
+
+ formHelper.resetForm({ scope: $scope });
+
+ }, function(err) {
+
+ vm.createFolderError = err;
+
+ });
+ }
+
+ }
function close() {
const showMenu = true;
diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html
index 71811d2b07..0554c430d1 100644
--- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html
+++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/create.html
@@ -2,7 +2,7 @@
\ No newline at end of file
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js
index a05836be06..541d329e05 100644
--- a/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/stylesheets/edit.controller.js
@@ -205,7 +205,7 @@
//As conflicts with our own tree search shortcut
_editor.commands.bindKey("ctrl-space", null);
- //TODO: Move all these keybinding config out into some helper/service
+ // TODO: Move all these keybinding config out into some helper/service
_editor.commands.addCommands([
//Disable (alt+shift+K)
//Conflicts with our own show shortcuts dialog - this overrides it
diff --git a/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js
index d019a44a10..32e9477133 100644
--- a/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/templates/delete.controller.js
@@ -22,7 +22,7 @@ function TemplatesDeleteController($scope, templateResource , treeService, navig
//get the root node before we remove it
var rootNode = treeService.getTreeRoot($scope.currentNode);
- //TODO: Need to sync tree, etc...
+ // TODO: Need to sync tree, etc...
treeService.removeNode($scope.currentNode);
navigationService.hideMenu();
}, function (err) {
diff --git a/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js
index 1f6fb8863a..dee2705638 100644
--- a/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/templates/edit.controller.js
@@ -634,7 +634,7 @@
templateCode = templateCode.replace(layoutDefRegex, "$1\"" + newValue + "\"$3");
} else {
// Declaration doesn't exist, so prepend to start of doc
- //TODO: Maybe insert at the cursor position, rather than just at the top of the doc?
+ // TODO: Maybe insert at the cursor position, rather than just at the top of the doc?
templateCode = "@{\n\tLayout = \"" + newValue + "\";\n}\n" + templateCode;
}
} else {
diff --git a/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js b/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js
index e939c25576..ac49709ee4 100644
--- a/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js
+++ b/src/Umbraco.Web.UI.Client/test/unit/app/templates/template-editor-controller.spec.js
@@ -117,7 +117,7 @@
}, 1000);
});
- ////TODO: THIS FAILED
+ //// TODO: THIS FAILED
//it("changes layout value when masterpage is selected", function() {
// var newTemplate;
// ace.clearSelection = nada;
diff --git a/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js b/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js
index 9a6e884ff6..1a1c850b15 100644
--- a/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js
+++ b/src/Umbraco.Web.UI.Client/test/unit/common/directives/val-email.spec.js
@@ -5,7 +5,7 @@
beforeEach(module('umbraco'));
beforeEach(inject(function ($injector) {
- //TODO: I have no idea why this doesn't work!!?? it freakin should
+ // TODO: I have no idea why this doesn't work!!?? it freakin should
//valEmailExpression = $injector.get('valEmailExpression');
//in the meantime, i've had to hard code the regex statement here
diff --git a/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js b/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js
index 7510b766a8..3f953fffcd 100644
--- a/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js
+++ b/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js
@@ -268,7 +268,7 @@
expect(numCalled).toEqual(3);
});
- //TODO: Finish testing the rest!
+ // TODO: Finish testing the rest!
});
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index 0ff158dadb..74c8d6c70d 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -106,7 +106,7 @@
- 8.0.0-alpha.33
+ 8.0.0-alpha.34
@@ -251,10 +251,6 @@
feedProxy.config
-
- Dashboard.config
- Designer
-
@@ -361,9 +357,6 @@
Designer
-
- Designer
- Designer
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
index 5ece650343..9dceead927 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
@@ -1328,9 +1328,9 @@ Mange hilsner fra Umbraco robotten
MakroerMedietyperMedlemmer
- Medlemsgruppe
+ MedlemsgrupperRoller
- Medlemstype
+ MedlemstyperDokumenttyperRelationstyperPakker
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
index 2e63acd3c3..3dcbfcded2 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
@@ -2016,4 +2016,16 @@ To manage your website, simply open the Umbraco back office and start adding con
Relation TypeRelations
+
+ Getting Started
+ Redirect URL Management
+ Content
+ Welcome
+ Examine Management
+ Published Status
+ Models Builder
+ Health Check
+ Getting Started
+ Install Umbraco Forms
+ >
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
index 86484b1393..8c8a405e29 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
@@ -2049,4 +2049,16 @@ To manage your website, simply open the Umbraco back office and start adding con
Relation TypeRelations
+
+ Getting Started
+ Redirect URL Management
+ Content
+ Welcome
+ Examine Management
+ Published Status
+ Models Builder
+ Health Check
+ Getting Started
+ Install Umbraco Forms
+
diff --git a/src/Umbraco.Web.UI/Views/Web.config b/src/Umbraco.Web.UI/Views/Web.config
index c9a74eebb0..c137c3705e 100644
--- a/src/Umbraco.Web.UI/Views/Web.config
+++ b/src/Umbraco.Web.UI/Views/Web.config
@@ -54,16 +54,16 @@
Somehow, transitive dependencies are not working correctly, and either (a) NuGet fails to properly
register this dependency, or (b) when reference assemblies are gathered before compiling views, this
dependency is missed. In any case, the result is that the ICodeProvider is passed a list of referenced
- assemblies that is missing netstandard.
+ assemblies that is missing .NET Standard.
It may be a mix of both. NuGet registers the dependency well enough, that we can actually build the
- whole application - but it is not doing something that is required in order to have netstandard
+ whole application - but it is not doing something that is required in order to have .NET Standard
being a dependency when building views.
See also: https://stackoverflow.com/questions/50165910
Funny enough, the CSharpCompiler already explicitly adds System.Runtime as a referenced assembly,
- with a comment mentioning an issue. But it's not adding netstandard. So, for the time being, to be sure,
+ with a comment mentioning an issue. But it's not adding .NET Standard. So, for the time being, to be sure,
we are adding both here.
-->
diff --git a/src/Umbraco.Web.UI/config/Dashboard.Release.config b/src/Umbraco.Web.UI/config/Dashboard.Release.config
deleted file mode 100644
index fec6ab34ae..0000000000
--- a/src/Umbraco.Web.UI/config/Dashboard.Release.config
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
- settings
-
-
-
- views/dashboard/settings/settingsdashboardintro.html
-
-
-
-
- views/dashboard/settings/examinemanagement.html
-
-
-
-
- views/dashboard/settings/publishedstatus.html
-
-
-
-
-
-
- forms
-
-
-
- views/dashboard/forms/formsdashboardintro.html
-
-
-
-
-
-
- media
-
-
-
- views/dashboard/media/mediafolderbrowser.html
-
-
-
-
-
-
- translator
-
-
- content
-
-
-
- admin
-
-
-
- views/dashboard/default/startupdashboardintro.html
-
-
-
-
-
-
- member
-
-
-
- views/dashboard/members/membersdashboardvideos.html
-
-
-
-
-
-
- settings
-
-
-
- /App_Plugins/ModelsBuilder/modelsbuilder.htm
-
-
-
-
-
-
- settings
-
-
-
- views/dashboard/settings/healthcheck.html
-
-
-
-
-
- content
-
-
-
- views/dashboard/content/redirecturls.html
-
-
-
-
diff --git a/src/Umbraco.Web.UI/config/Dashboard.config b/src/Umbraco.Web.UI/config/Dashboard.config
deleted file mode 100644
index fec6ab34ae..0000000000
--- a/src/Umbraco.Web.UI/config/Dashboard.config
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
- settings
-
-
-
- views/dashboard/settings/settingsdashboardintro.html
-
-
-
-
- views/dashboard/settings/examinemanagement.html
-
-
-
-
- views/dashboard/settings/publishedstatus.html
-
-
-
-
-
-
- forms
-
-
-
- views/dashboard/forms/formsdashboardintro.html
-
-
-
-
-
-
- media
-
-
-
- views/dashboard/media/mediafolderbrowser.html
-
-
-
-
-
-
- translator
-
-
- content
-
-
-
- admin
-
-
-
- views/dashboard/default/startupdashboardintro.html
-
-
-
-
-
-
- member
-
-
-
- views/dashboard/members/membersdashboardvideos.html
-
-
-
-
-
-
- settings
-
-
-
- /App_Plugins/ModelsBuilder/modelsbuilder.htm
-
-
-
-
-
-
- settings
-
-
-
- views/dashboard/settings/healthcheck.html
-
-
-
-
-
- content
-
-
-
- views/dashboard/content/redirecturls.html
-
-
-
-
diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config
index 2371282a14..e7399f600b 100644
--- a/src/Umbraco.Web.UI/web.Template.config
+++ b/src/Umbraco.Web.UI/web.Template.config
@@ -14,7 +14,6 @@
-
@@ -28,7 +27,6 @@
-
diff --git a/src/Umbraco.Web/Actions/ActionChangeDocType.cs b/src/Umbraco.Web/Actions/ActionChangeDocType.cs
index 56868e9fb0..dcdff94037 100644
--- a/src/Umbraco.Web/Actions/ActionChangeDocType.cs
+++ b/src/Umbraco.Web/Actions/ActionChangeDocType.cs
@@ -5,7 +5,7 @@ using Umbraco.Web.UI.Pages;
namespace Umbraco.Web.Actions
{
- //TODO: Add this back in when we support this functionality again
+ // TODO: Add this back in when we support this functionality again
/////
///// This action is invoked when the document type of a piece of content is changed
/////
diff --git a/src/Umbraco.Web/Cache/ContentCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentCacheRefresher.cs
index a1942ed141..99a1e6c803 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)
{
- // todo - 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...
- // todo - 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 6916b40f2d..9bd275bc3e 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);
}
- // todo - not sure I like these?
+ // TODO: not sure I like these?
TagsValueConverter.ClearCaches();
SliderValueConverter.ClearCaches();
diff --git a/src/Umbraco.Web/Cache/DistributedCache.cs b/src/Umbraco.Web/Cache/DistributedCache.cs
index c445f66621..1e0e33ebd7 100644
--- a/src/Umbraco.Web/Cache/DistributedCache.cs
+++ b/src/Umbraco.Web/Cache/DistributedCache.cs
@@ -24,7 +24,7 @@ namespace Umbraco.Web.Cache
#region Core notification methods
///
- /// Notifies the distributed cache of specifieds item invalidation, for a specified .
+ /// Notifies the distributed cache of specified item invalidation, for a specified .
///
/// The type of the invalidated items.
/// The unique identifier of the ICacheRefresher.
@@ -148,7 +148,7 @@ namespace Umbraco.Web.Cache
}
///
- /// Notifies the distributed cache of specifieds item removal, for a specified .
+ /// Notifies the distributed cache of specified item removal, for a specified .
///
/// The type of the removed items.
/// The unique identifier of the ICacheRefresher.
diff --git a/src/Umbraco.Web/Cache/DistributedCacheBinder.cs b/src/Umbraco.Web/Cache/DistributedCacheBinder.cs
index ce8267dfc8..c64951810a 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)
{
- // todo - 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 f75d8ead87..951b7f79df 100644
--- a/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs
+++ b/src/Umbraco.Web/Cache/DistributedCacheBinder_Handlers.cs
@@ -196,7 +196,7 @@ namespace Umbraco.Web.Cache
_distributedCache.RefreshContentCache(args.Changes.ToArray());
}
- // todo 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) { }
@@ -267,7 +267,7 @@ namespace Umbraco.Web.Cache
#region LocalizationService / Language
///
- /// Fires when a langauge is deleted
+ /// Fires when a language is deleted
///
///
///
@@ -278,7 +278,7 @@ namespace Umbraco.Web.Cache
}
///
- /// Fires when a langauge is saved
+ /// Fires when a language is saved
///
///
///
@@ -307,7 +307,7 @@ namespace Umbraco.Web.Cache
_distributedCache.RefreshContentTypeCache(args.Changes.ToArray());
}
- // todo 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) { }
@@ -321,7 +321,7 @@ namespace Umbraco.Web.Cache
private void UserService_UserGroupPermissionsAssigned(IUserService sender, SaveEventArgs e)
{
- //TODO: Not sure if we need this yet depends if we start caching permissions
+ // TODO: Not sure if we need this yet depends if we start caching permissions
//var groupIds = e.SavedEntities.Select(x => x.UserGroupId).Distinct();
//foreach (var groupId in groupIds)
//{
@@ -379,7 +379,7 @@ namespace Umbraco.Web.Cache
_distributedCache.RefreshTemplateCache(entity.Id);
}
- // todo 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) { }
@@ -408,7 +408,7 @@ namespace Umbraco.Web.Cache
_distributedCache.RefreshMediaCache(args.Changes.ToArray());
}
- // todo 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 c5dfcfd1e7..9093124609 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)
{
- // todo - 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/Components/DatabaseServerRegistrarAndMessengerComponent.cs b/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs
index 2e3132a82c..4ae371502f 100644
--- a/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs
+++ b/src/Umbraco.Web/Components/DatabaseServerRegistrarAndMessengerComponent.cs
@@ -34,7 +34,7 @@ namespace Umbraco.Web.Components
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
// during Initialize / Startup, we end up checking Examine, which needs to be initialized beforehand
- // todo - should not be a strong dependency on "examine" but on an "indexing component"
+ // TODO: should not be a strong dependency on "examine" but on an "indexing component"
[ComposeAfter(typeof(ExamineComposer))]
public sealed class DatabaseServerRegistrarAndMessengerComposer : ComponentComposer, ICoreComposer
@@ -106,30 +106,36 @@ namespace Umbraco.Web.Components
public DatabaseServerRegistrarAndMessengerComponent(IRuntimeState runtime, IServerRegistrar serverRegistrar, IServerMessenger serverMessenger, IServerRegistrationService registrationService, ILogger logger, IndexRebuilder indexRebuilder)
{
- _registrar = serverRegistrar as DatabaseServerRegistrar;
- if (_registrar == null) throw new Exception("panic: registar.");
-
- _messenger = serverMessenger as BatchedDatabaseServerMessenger;
- if (_messenger == null) throw new Exception("panic: messenger");
-
_runtime = runtime;
_logger = logger;
_registrationService = registrationService;
_indexRebuilder = indexRebuilder;
- _touchTaskRunner = new BackgroundTaskRunner("ServerRegistration",
- new BackgroundTaskRunnerOptions { AutoStart = true }, logger);
- _processTaskRunner = new BackgroundTaskRunner("ServerInstProcess",
- new BackgroundTaskRunnerOptions { AutoStart = true }, logger);
+ // create task runner for DatabaseServerRegistrar
+ _registrar = serverRegistrar as DatabaseServerRegistrar;
+ if (_registrar != null)
+ {
+ _touchTaskRunner = new BackgroundTaskRunner("ServerRegistration",
+ new BackgroundTaskRunnerOptions { AutoStart = true }, logger);
+ }
+
+ // create task runner for BatchedDatabaseServerMessenger
+ _messenger = serverMessenger as BatchedDatabaseServerMessenger;
+ if (_messenger != null)
+ {
+ _processTaskRunner = new BackgroundTaskRunner("ServerInstProcess",
+ new BackgroundTaskRunnerOptions { AutoStart = true }, logger);
+ }
}
public void Initialize()
{
//We will start the whole process when a successful request is made
- UmbracoModule.RouteAttempt += RegisterBackgroundTasksOnce;
+ if (_registrar != null || _messenger != null)
+ UmbracoModule.RouteAttempt += RegisterBackgroundTasksOnce;
// must come last, as it references some _variables
- _messenger.Startup();
+ _messenger?.Startup();
}
public void Terminate()
@@ -175,6 +181,9 @@ namespace Umbraco.Web.Components
private IBackgroundTask RegisterInstructionProcess()
{
+ if (_messenger == null)
+ return null;
+
var task = new InstructionProcessTask(_processTaskRunner,
60000, //delay before first execution
_messenger.Options.ThrottleSeconds*1000, //amount of ms between executions
@@ -186,6 +195,9 @@ namespace Umbraco.Web.Components
private IBackgroundTask RegisterTouchServer(IServerRegistrationService registrationService, string serverAddress)
{
+ if (_registrar == null)
+ return null;
+
var task = new TouchServerTask(_touchTaskRunner,
15000, //delay before first execution
_registrar.Options.RecurringSeconds*1000, //amount of ms between executions
diff --git a/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs b/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs
index 377a6bdb86..0aa3c7f8a1 100644
--- a/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs
+++ b/src/Umbraco.Web/Composing/Composers/ControllersComposer.cs
@@ -32,8 +32,7 @@ namespace Umbraco.Web.Composing.Composers
// UmbracoApiController is fast-ish because they both are IDiscoverable. Scanning for IController or IHttpController
// is a full, non-cached scan = expensive, we do it only for 1 assembly.
//
- // TODO
- // find a way to scan for IController *and* IHttpController in one single pass
+ // TODO: find a way to scan for IController *and* IHttpController in one single pass
// or, actually register them manually so don't require a full scan for these
// 5 are IController but not PluginController
// Umbraco.Web.Mvc.RenderMvcController
diff --git a/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs b/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs
index b848425736..f73491f1fb 100644
--- a/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs
+++ b/src/Umbraco.Web/Composing/Composers/InstallerComposer.cs
@@ -20,7 +20,7 @@ namespace Umbraco.Web.Composing.Composers
composition.Register(Lifetime.Scope);
composition.Register(Lifetime.Scope);
- //TODO: Add these back once we have a compatible starter kit
+ // TODO: Add these back once we have a compatible starter kit
//container.Register(Lifetime.Scope);
//container.Register(Lifetime.Scope);
//container.Register(Lifetime.Scope);
diff --git a/src/Umbraco.Web/Composing/Current.cs b/src/Umbraco.Web/Composing/Current.cs
index bd0e3d02dc..70b0927c43 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
- // todo - 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/CompositionExtensions.cs b/src/Umbraco.Web/CompositionExtensions.cs
index 246127b312..783c991ab4 100644
--- a/src/Umbraco.Web/CompositionExtensions.cs
+++ b/src/Umbraco.Web/CompositionExtensions.cs
@@ -10,6 +10,7 @@ using Umbraco.Web.Routing;
using Umbraco.Web.ContentApps;
using Umbraco.Web.Tour;
using Umbraco.Web.Trees;
+using Umbraco.Web.Dashboards;
// the namespace here is intentional - although defined in Umbraco.Web assembly,
// this class should be visible when using Umbraco.Core.Components, alongside
@@ -92,6 +93,13 @@ namespace Umbraco.Core.Components
public static BackOfficeSectionCollectionBuilder Sections(this Composition composition)
=> composition.WithCollectionBuilder();
+ ///
+ /// Gets the backoffice dashboards collection builder.
+ ///
+ /// The composition.
+ public static DashboardCollectionBuilder Dashboards(this Composition composition)
+ => composition.WithCollectionBuilder();
+
#endregion
#region Uniques
diff --git a/src/Umbraco.Web/Controllers/UmbRegisterController.cs b/src/Umbraco.Web/Controllers/UmbRegisterController.cs
index 66c8a8143c..726797c26a 100644
--- a/src/Umbraco.Web/Controllers/UmbRegisterController.cs
+++ b/src/Umbraco.Web/Controllers/UmbRegisterController.cs
@@ -64,7 +64,7 @@ namespace Umbraco.Web.Controllers
break;
case MembershipCreateStatus.InvalidQuestion:
case MembershipCreateStatus.InvalidAnswer:
- //TODO: Support q/a http://issues.umbraco.org/issue/U4-3213
+ // TODO: Support q/a http://issues.umbraco.org/issue/U4-3213
throw new NotImplementedException(status.ToString());
case MembershipCreateStatus.InvalidEmail:
ModelState.AddModelError("registerModel.Email", "Email is invalid");
diff --git a/src/Umbraco.Web/Dashboards/ContentDashboard.cs b/src/Umbraco.Web/Dashboards/ContentDashboard.cs
new file mode 100644
index 0000000000..0cd96f738c
--- /dev/null
+++ b/src/Umbraco.Web/Dashboards/ContentDashboard.cs
@@ -0,0 +1,29 @@
+using Umbraco.Core;
+using Umbraco.Core.Composing;
+using Umbraco.Core.Dashboards;
+
+namespace Umbraco.Web.Dashboards
+{
+ [Weight(10)]
+ public class ContentDashboard : IDashboard
+ {
+ public string Alias => "contentIntro";
+
+ public string[] Sections => new [] { "content" };
+
+ public string View => "views/dashboard/default/startupdashboardintro.html";
+
+ public IAccessRule[] AccessRules
+ {
+ get
+ {
+ var rules = new IAccessRule[]
+ {
+ new AccessRule {Type = AccessRuleType.Deny, Value = Constants.Security.TranslatorGroupAlias},
+ new AccessRule {Type = AccessRuleType.Grant, Value = Constants.Security.AdminGroupAlias}
+ };
+ return rules;
+ }
+ }
+ }
+}
diff --git a/src/Umbraco.Web/Dashboards/DashboardCollection.cs b/src/Umbraco.Web/Dashboards/DashboardCollection.cs
new file mode 100644
index 0000000000..616a2cc8cc
--- /dev/null
+++ b/src/Umbraco.Web/Dashboards/DashboardCollection.cs
@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+using Umbraco.Core.Composing;
+using Umbraco.Core.Dashboards;
+
+namespace Umbraco.Web.Dashboards
+{
+ public class DashboardCollection : BuilderCollectionBase