mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
- Extensions: Install extensions from zip files.
- Themes: installing new themes from the themes admin. --HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043816
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Core.Themes.ViewModels;
|
||||
using Orchard.Localization;
|
||||
@@ -51,6 +52,10 @@ namespace Orchard.Core.Themes.Controllers {
|
||||
[AcceptVerbs(HttpVerbs.Post)]
|
||||
public ActionResult Install(FormCollection input) {
|
||||
try {
|
||||
foreach (string fileName in Request.Files) {
|
||||
HttpPostedFileBase file = Request.Files[fileName];
|
||||
_themeService.InstallTheme(file);
|
||||
}
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
catch (Exception exception) {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using Orchard.Extensions;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Models;
|
||||
@@ -71,6 +72,10 @@ namespace Orchard.Core.Themes.Services {
|
||||
}
|
||||
}
|
||||
|
||||
public void InstallTheme(HttpPostedFileBase file) {
|
||||
_extensionManager.InstallExtension("Theme", file);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user