mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-07 07:34:30 +08:00
Code styling
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
using Orchard.ContentManagement;
|
||||
using System;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Fields.Fields;
|
||||
using Orchard.Fields.Settings;
|
||||
using Orchard.Localization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Orchard.Fields.Drivers {
|
||||
public class EnumerationFieldDriver : ContentFieldDriver<EnumerationField> {
|
||||
|
@@ -14,11 +14,11 @@ namespace Orchard.Fields.Fields {
|
||||
public string[] SelectedValues {
|
||||
get {
|
||||
var value = Value;
|
||||
if(string.IsNullOrWhiteSpace(value)) {
|
||||
if (string.IsNullOrWhiteSpace(value)) {
|
||||
return new string[0];
|
||||
}
|
||||
|
||||
return value.Split(new [] { Separator }, StringSplitOptions.RemoveEmptyEntries);
|
||||
return value.Split(new[] { Separator }, StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
|
||||
set {
|
||||
|
@@ -51,7 +51,8 @@ namespace Orchard.Widgets.Drivers {
|
||||
|
||||
try {
|
||||
_conditionManager.Matches(layerPart.LayerRule);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
updater.AddModelError("Description", T("The rule is not valid: {0}", e.Message));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user