Merge with 6.0.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
@ECHO OFF
|
||||
SET release=6.0.2
|
||||
SET release=6.0.3
|
||||
SET comment=
|
||||
SET version=%release%
|
||||
|
||||
|
||||
@@ -149,7 +149,9 @@ namespace SqlCE4Umbraco
|
||||
var dataDirectory = AppDomain.CurrentDomain.GetData("DataDirectory") as string;
|
||||
if (!string.IsNullOrEmpty(dataDirectory))
|
||||
{
|
||||
path = path.Replace("|DataDirectory|", dataDirectory + System.IO.Path.DirectorySeparatorChar);
|
||||
path = path.Contains(@"|\")
|
||||
? path.Replace("|DataDirectory|", dataDirectory)
|
||||
: path.Replace("|DataDirectory|", dataDirectory + System.IO.Path.DirectorySeparatorChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Umbraco.Core
|
||||
public void ConfigureEmbeddedDatabaseConnection()
|
||||
{
|
||||
const string providerName = "System.Data.SqlServerCe.4.0";
|
||||
const string connectionString = "Datasource=|DataDirectory|Umbraco.sdf";
|
||||
const string connectionString = @"Data Source=|DataDirectory|\Umbraco.sdf";
|
||||
|
||||
SaveConnectionString(connectionString, providerName);
|
||||
|
||||
|
||||
@@ -335,8 +335,8 @@ namespace Umbraco.Core.Models
|
||||
if (Mandatory && (value == null || string.IsNullOrEmpty(value.ToString())))
|
||||
return false;
|
||||
|
||||
//Check against Regular Expression for Legacy DataTypes
|
||||
if(!string.IsNullOrEmpty(ValidationRegExp))
|
||||
//Check against Regular Expression for Legacy DataTypes - Validation exists and value is not null:
|
||||
if(string.IsNullOrEmpty(ValidationRegExp) == false && (value != null && string.IsNullOrEmpty(value.ToString()) == false))
|
||||
{
|
||||
var regexPattern = new Regex(ValidationRegExp);
|
||||
return regexPattern.IsMatch(value.ToString());
|
||||
|
||||
@@ -348,6 +348,17 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
var propertyDataDtos = Database.Fetch<PropertyDataDto, PropertyTypeDto>(sql);
|
||||
var propertyFactory = new PropertyFactory(contentType, versionId, id);
|
||||
var properties = propertyFactory.BuildMediaEntity(propertyDataDtos);
|
||||
|
||||
var newProperties = properties.Where(x => x.HasIdentity == false);
|
||||
foreach (var property in newProperties)
|
||||
{
|
||||
var propertyDataDto = new PropertyDataDto { NodeId = id, PropertyTypeId = property.PropertyTypeId, VersionId = versionId };
|
||||
int primaryKey = Convert.ToInt32(Database.Insert(propertyDataDto));
|
||||
|
||||
property.Version = versionId;
|
||||
property.Id = primaryKey;
|
||||
}
|
||||
|
||||
return new PropertyCollection(properties);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace umbraco.cms.presentation.developer
|
||||
|
||||
}
|
||||
|
||||
protected void save_click(object sender, System.Web.UI.ImageClickEventArgs e)
|
||||
protected void save_click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
// save prevalues;
|
||||
if (_prevalue != null)
|
||||
@@ -106,7 +106,7 @@ namespace umbraco.cms.presentation.developer
|
||||
|
||||
ClientTools.ShowSpeechBubble(BasePages.BasePage.speechBubbleIcon.save, ui.Text("speechBubbles", "dataTypeSaved", null), "");
|
||||
|
||||
//Response.Redirect("editDataType.aspx?id=" + _id);
|
||||
ClientTools.SyncTree(dt.Path, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -394,11 +394,17 @@ namespace umbraco.BusinessLogic
|
||||
/// <returns>A user or null</returns>
|
||||
public static User GetCurrent()
|
||||
{
|
||||
if (umbraco.BasePages.BasePage.umbracoUserContextID != "")
|
||||
return BusinessLogic.User.GetUser(umbraco.BasePages.BasePage.GetUserId(umbraco.BasePages.BasePage.umbracoUserContextID));
|
||||
else
|
||||
try
|
||||
{
|
||||
if (umbraco.BasePages.BasePage.umbracoUserContextID != "")
|
||||
return BusinessLogic.User.GetUser(umbraco.BasePages.BasePage.GetUserId(umbraco.BasePages.BasePage.umbracoUserContextID));
|
||||
else
|
||||
return null;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace umbraco.cms.businesslogic.media
|
||||
|
||||
base.Save();
|
||||
|
||||
FireBeforeSave(e);
|
||||
FireAfterSave(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,11 +53,11 @@ namespace umbraco.DataLayer
|
||||
|
||||
if (forceLegacyConnection == false && IsEmbeddedDatabase(connectionString) && connectionString.ToLower().Contains("SQLCE4Umbraco".ToLower()) == false)
|
||||
{
|
||||
// Input is : Datasource=|DataDirectory|Umbraco.sdf
|
||||
// Should be: datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\Umbraco.sdf
|
||||
connectionString = connectionString.Replace("Datasource", "Data Source");
|
||||
|
||||
connectionString = connectionString.Replace("Datasource", "data source");
|
||||
if(connectionString.Contains(@"|\") == false)
|
||||
connectionString = connectionString.Insert(connectionString.LastIndexOf('|') + 1, "\\");
|
||||
|
||||
connectionString = string.Format("datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;{0}", connectionString);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user