Fixed a few more split separators.

This commit is contained in:
Claus
2015-11-30 19:29:23 +01:00
parent 25d8fc7a13
commit bfbc6595fb
2 changed files with 2 additions and 5 deletions

View File

@@ -560,8 +560,7 @@ namespace Umbraco.Core.Models
//Additional thumbnails configured as prevalues on the DataType
if (thumbnailSizes != null)
{
var sep = (thumbnailSizes.Contains("") == false && thumbnailSizes.Contains(",")) ? ',' : ';';
foreach (var thumb in thumbnailSizes.Split(sep))
foreach (var thumb in thumbnailSizes.Split(new[] { ";", "," }, StringSplitOptions.RemoveEmptyEntries))
{
int thumbSize;
if (thumb != "" && int.TryParse(thumb, out thumbSize))

View File

@@ -89,9 +89,7 @@ namespace umbraco.cms.businesslogic.datatype
// additional thumbnails configured as prevalues on the DataType
if (_thumbnailSizes != "")
{
char sep = (_thumbnailSizes.Contains("") == false && _thumbnailSizes.Contains(",")) ? ',' : ';';
foreach (string thumb in _thumbnailSizes.Split(sep))
foreach (var thumb in _thumbnailSizes.Split(new[] { ";", "," }, StringSplitOptions.RemoveEmptyEntries))
{
int thumbSize;
if (thumb != "" && int.TryParse(thumb, out thumbSize))