diff --git a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs index f987e69b3d..9b08279716 100644 --- a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs +++ b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs @@ -3,6 +3,7 @@ using System.Data; using System.Linq; using System.Reflection; using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Core.Persistence.SqlSyntax; namespace Umbraco.Core.Persistence.DatabaseModelDefinitions { @@ -107,6 +108,12 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions var constraintAttribute = propertyInfo.FirstAttribute(); if (constraintAttribute != null) { + //Special case for MySQL as it can't have multiple default DateTime values, which + //is what the umbracoServer table definition is trying to create + if (SqlSyntaxContext.SqlSyntaxProvider is MySqlSyntaxProvider && definition.TableName == "umbracoServer" && + definition.TableName.ToLowerInvariant() == "lastNotifiedDate".ToLowerInvariant()) + return definition; + definition.ConstraintName = constraintAttribute.Name ?? string.Empty; definition.DefaultValue = constraintAttribute.Default ?? string.Empty; } diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index e6268bac20..f9d60fbacb 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -2142,16 +2142,15 @@ - - - - + + Code + @@ -2609,8 +2608,8 @@ - - + + diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml new file mode 100644 index 0000000000..8d10a3a9c7 --- /dev/null +++ b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml @@ -0,0 +1 @@ +@inherits Umbraco.Web.Mvc.UmbracoViewPage \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml index d82bc50fef..2363dcc14c 100644 --- a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml @@ -1 +1 @@ -@inherits Umbraco.Web.Mvc.UmbracoViewPage \ No newline at end of file +@inherits Umbraco.Web.Mvc.UmbracoTemplatePage \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs index 0352406992..d7298d09a1 100644 --- a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs +++ b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using Umbraco.Core.IO; using Umbraco.Web.UI.Install.Steps.Skinning; using Umbraco.Web.UI.Pages; @@ -24,9 +21,9 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages private void ShowStarterKits() { - if (Directory.Exists(this.Server.MapPath(SystemDirectories.Install)) == false) + if (Directory.Exists(Server.MapPath(SystemDirectories.Install)) == false) { - this.InstallationDirectoryNotAvailable.Visible = true; + InstallationDirectoryNotAvailable.Visible = true; StarterKitNotInstalled.Visible = false; StarterKitInstalled.Visible = false; @@ -41,7 +38,6 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages StarterKitNotInstalled.Visible = true; StarterKitInstalled.Visible = false; - InstallationDirectoryNotAvailable.Visible = true; } diff --git a/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js b/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js index af27a79d43..f5034b4707 100644 --- a/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js +++ b/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js @@ -62,9 +62,19 @@ $.datepicker._connectDatepicker = function(target, inst) { */ $.datepicker._showDatepickerOverride = $.datepicker._showDatepicker; $.datepicker._showDatepicker = function (input) { + // keep the current value + var originalval = input.value; + + // Keep the first 10 chars for now yyyy-mm-dd - this removes the time part which was breaking the standardDatePicker parsing code + input.value = originalval.length>10 ? originalval.substring(0, 10) : originalval; + + // Call the original method which will show the datepicker $.datepicker._showDatepickerOverride(input); + // Put it back + input.value = originalval; + input = input.target || input; // find from button/image trigger diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index f45ff9c30e..a7a57c3c32 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -70,15 +70,15 @@ namespace Umbraco.Web.Security var allowGroupsList = allowGroups as IList ?? allowGroups.ToList(); if (allowAction && allowGroupsList.Any(allowGroup => allowGroup != string.Empty)) { - // Allow only if member's type is in list + // Allow only if member is assigned to a group in the list var groups = Roles.GetRolesForUser(member.LoginName); - allowAction = groups.Select(s => s.ToLowerInvariant()).Intersect(groups.Select(myGroup => myGroup.ToLowerInvariant())).Any(); + allowAction = allowGroupsList.Select(s => s.ToLowerInvariant()).Intersect(groups.Select(myGroup => myGroup.ToLowerInvariant())).Any(); } // If specific members defined, check member is of one of those if (allowAction && allowMembers.Any()) { - // Allow only if member's type is in list + // Allow only if member's Id is in the list allowAction = allowMembers.Contains(member.Id); } }