defaultDocumentTypeProperty is no longer case-sensitive. Added to the Release config as well so it makes it into the umbraco downloadable package.

This commit is contained in:
Sebastiaan Janssen
2013-07-19 15:40:12 +02:00
parent 90cfd004cb
commit 64fb588556
2 changed files with 5 additions and 1 deletions

View File

@@ -111,6 +111,9 @@
<!-- These file types will not be allowed to be uploaded via the upload control for media and content -->
<disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd</disallowedUploadFiles>
<!-- Defines the default document type property used when adding properties in the back-office (if missing or empty, defaults to Textstring -->
<defaultDocumentTypeProperty>Textstring</defaultDocumentTypeProperty>
</content>
<security>

View File

@@ -247,7 +247,8 @@ namespace umbraco.controls.GenericProperties
private void SetDefaultDocumentTypeProperty()
{
var itemToSelect = ddlTypes.Items.FindByText(UmbracoSettings.DefaultDocumentTypeProperty);
var itemToSelect = ddlTypes.Items.Cast<ListItem>().FirstOrDefault(item => item.Text.ToLowerInvariant() == UmbracoSettings.DefaultDocumentTypeProperty.ToLowerInvariant());
if (itemToSelect != null)
{
itemToSelect.Selected = true;