Manually merge in changes for previous commits due to the codebase differences in 6.1

This commit is contained in:
Shannon Deminick
2013-04-18 00:06:42 +06:00
parent a38f0af49b
commit 0107a10145

View File

@@ -344,18 +344,28 @@ namespace umbraco.controls
/// </summary>
private void SetNameAndDataTypeValues()
{
if (!string.IsNullOrEmpty(NameTxt.Text))
_content.Text = NameTxt.Text;
foreach (var property in DataTypes)
//we only continue saving anything if:
// SavePropertyDataWhenInvalid == true
// OR if the page is actually valid.
if (SavePropertyDataWhenInvalid || Page.IsValid)
{
var defaultData = property.Value.Data as DefaultData;
if (defaultData != null)
foreach (var property in DataTypes)
{
defaultData.PropertyTypeAlias = property.Key;
defaultData.NodeId = _content.Id;
var defaultData = property.Value.Data as DefaultData;
if (defaultData != null)
{
defaultData.PropertyTypeAlias = property.Key;
defaultData.NodeId = _content.Id;
}
property.Value.DataEditor.Save();
}
//don't update if the name is empty
if (!NameTxt.Text.IsNullOrWhiteSpace())
{
_content.Text = NameTxt.Text;
}
property.Value.DataEditor.Save();
}
}