mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Cleaned out remaining dependencies on BaseViewModel (sln builds once again - yay)
--HG-- branch : dev
This commit is contained in:
@@ -19,7 +19,9 @@ namespace Orchard.Tests.UI.Notify {
|
||||
return new ActionExecutedContext(controllerContext, actionDescriptor, false/*cancelled*/, null/*exception*/);
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if REFACTORING
|
||||
|
||||
[Test]
|
||||
public void AfterActionExecutedMessagesShouldAppearInTempData() {
|
||||
var sink = new Notifier();
|
||||
var filter = new NotifyFilter(sink);
|
||||
@@ -58,8 +60,6 @@ namespace Orchard.Tests.UI.Notify {
|
||||
Assert.That(executedContext.Controller.TempData["messages"], Is.StringContaining("dont-destroy"));
|
||||
}
|
||||
|
||||
#if REFACTORING
|
||||
|
||||
[Test]
|
||||
public void TempDataBuildsMessagesWhenResultExecutingIsBaseViewModel() {
|
||||
var sink = new Notifier();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Core.Dashboard.Controllers {
|
||||
public class AdminController : Controller {
|
||||
public ActionResult Index() {
|
||||
return View(new AdminViewModel());
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.Services;
|
||||
using Orchard.Settings;
|
||||
using Orchard.Themes;
|
||||
@@ -25,14 +24,13 @@ namespace Orchard.Core.HomePage.Controllers {
|
||||
public ActionResult Index() {
|
||||
try {
|
||||
var homepage = CurrentSite.HomePage;
|
||||
if (String.IsNullOrEmpty(homepage)) {
|
||||
return View(new BaseViewModel());
|
||||
}
|
||||
if (String.IsNullOrEmpty(homepage))
|
||||
return View();
|
||||
|
||||
var homePageParameters = homepage.Split(';');
|
||||
if (homePageParameters.Length != 2) {
|
||||
return View(new BaseViewModel());
|
||||
}
|
||||
if (homePageParameters.Length != 2)
|
||||
return View();
|
||||
|
||||
var providerName = homePageParameters[0];
|
||||
var item = Int32.Parse(homePageParameters[1]);
|
||||
|
||||
@@ -50,10 +48,10 @@ namespace Orchard.Core.HomePage.Controllers {
|
||||
return result;
|
||||
}
|
||||
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
catch {
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Data.Migration.Generator;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.UI.Admin;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
@@ -21,7 +20,7 @@ namespace Orchard.DevTools.Controllers {
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public ActionResult Index() {
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult UpdateDatabase() {
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using System.Dynamic;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.DevTools.Models;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.Themes;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.UI.Admin;
|
||||
using Orchard.UI.Zones;
|
||||
|
||||
namespace Orchard.DevTools.Controllers {
|
||||
[Themed]
|
||||
@@ -28,7 +25,7 @@ namespace Orchard.DevTools.Controllers {
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public ActionResult Index() {
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult NotAuthorized() {
|
||||
|
||||
@@ -95,10 +95,6 @@ namespace Orchard.Themes.Controllers {
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult Install() {
|
||||
return View(new BaseViewModel());
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Install(FormCollection input) {
|
||||
try {
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.Security;
|
||||
using Orchard.Users.Services;
|
||||
using Orchard.Users.ViewModels;
|
||||
@@ -44,7 +43,7 @@ namespace Orchard.Users.Controllers {
|
||||
//TODO: (erikpo) Add a setting for whether or not to log access denieds since these can fill up a database pretty fast from bots on a high traffic site
|
||||
Logger.Information("Access denied to user #{0} '{1}' on {2}", currentUser.Id, currentUser.UserName, returnUrl);
|
||||
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult LogOn() {
|
||||
@@ -89,7 +88,7 @@ namespace Orchard.Users.Controllers {
|
||||
public ActionResult Register() {
|
||||
ViewData["PasswordLength"] = MinPasswordLength;
|
||||
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@@ -118,7 +117,7 @@ namespace Orchard.Users.Controllers {
|
||||
public ActionResult ChangePassword() {
|
||||
ViewData["PasswordLength"] = MinPasswordLength;
|
||||
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -152,7 +151,7 @@ namespace Orchard.Users.Controllers {
|
||||
}
|
||||
|
||||
public ActionResult ChangePasswordSuccess() {
|
||||
return View(new BaseViewModel());
|
||||
return View();
|
||||
}
|
||||
|
||||
protected override void OnActionExecuting(ActionExecutingContext filterContext) {
|
||||
|
||||
Reference in New Issue
Block a user