diff --git a/Urs.Shop/Areas/Admin/Controllers/PluginController.cs b/Urs.Shop/Areas/Admin/Controllers/PluginController.cs index cfca265ef7afc8b4b9c083edf55fb4963721490a..b0038d08ac5b47a11ac7c3e7d43f0ec94d09b72f 100644 --- a/Urs.Shop/Areas/Admin/Controllers/PluginController.cs +++ b/Urs.Shop/Areas/Admin/Controllers/PluginController.cs @@ -156,10 +156,7 @@ namespace Urs.Admin.Controllers try { - string systemName = null; - foreach (var formValue in form.Keys) - if (formValue.StartsWith("install-plugin-link-", StringComparison.InvariantCultureIgnoreCase)) - systemName = formValue.Substring("install-plugin-link-".Length); + string systemName = form["SystemName"]; var pluginDescriptor = _pluginFinder.GetPluginDescriptorBySystemName(systemName, LoadPluginsMode.All); if (pluginDescriptor == null) @@ -196,10 +193,7 @@ namespace Urs.Admin.Controllers try { //get plugin system name - string systemName = null; - foreach (var formValue in form.Keys) - if (formValue.StartsWith("uninstall-plugin-link-", StringComparison.InvariantCultureIgnoreCase)) - systemName = formValue.Substring("uninstall-plugin-link-".Length); + string systemName = form["SystemName"]; var pluginDescriptor = _pluginFinder.GetPluginDescriptorBySystemName(systemName, LoadPluginsMode.All); if (pluginDescriptor == null) @@ -221,6 +215,7 @@ namespace Urs.Admin.Controllers } catch (Exception exc) { + return Json(new { error=1,msg=exc.Message }); } return Json(new { success = 1 }); diff --git a/Urs.Shop/Areas/Admin/Models/Common/PluginModel.cs b/Urs.Shop/Areas/Admin/Models/Common/PluginModel.cs index 8466f7ab7c3d68566359226c86f32e9513fce2a4..b344ee44211743b2d351b03ffbfc279633c27b7f 100644 --- a/Urs.Shop/Areas/Admin/Models/Common/PluginModel.cs +++ b/Urs.Shop/Areas/Admin/Models/Common/PluginModel.cs @@ -1,15 +1,9 @@ -using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc; -using FluentValidation.Attributes; -using Urs.Admin.Validators.Plugins; -using Urs.Framework; -using Urs.Framework.Localization; -using Urs.Framework.Mvc; +using Urs.Framework; using Urs.Framework.Models; +using Urs.Framework.Mvc; namespace Urs.Admin.Models.Common { - [Validator(typeof(PluginValidator))] public partial class PluginModel : BaseModel, IPluginModel { [UrsDisplayName("Admin.Configuration.Plugins.Fields.Group")] diff --git a/urshopdb.sql "b/\346\225\260\346\215\256\345\272\223/urshopdb.sql" similarity index 100% rename from urshopdb.sql rename to "\346\225\260\346\215\256\345\272\223/urshopdb.sql" diff --git a/urshopdb.update.sql "b/\346\225\260\346\215\256\345\272\223/urshopdb.update.sql" similarity index 100% rename from urshopdb.update.sql rename to "\346\225\260\346\215\256\345\272\223/urshopdb.update.sql"