Skip to content

Commit

Permalink
Merge branch 'anurse/i5-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
analogrelay committed Nov 22, 2013
2 parents 85122fb + e8a5fdf commit 34194dd
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src/NuGetGallery/App_Start/Routes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ public static void RegisterRoutes(RouteCollection routes)
"",
new { controller = MVC.Pages.Name, action = "Home" }); // T4MVC doesn't work with Async Action

routes.MapRoute(
RouteName.Error500,
"errors/500",
MVC.Errors.InternalError());

routes.MapRoute(
RouteName.Error404,
"errors/404",
MVC.Errors.NotFound());

routes.MapRoute(
RouteName.StatisticsHome,
"stats",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NuGetGallery.Areas.Admin.Controllers
{
[Authorize(Roles="Admins")]
public class AdminControllerBase : Controller
public class AdminControllerBase : AppController
{
}
}
1 change: 1 addition & 0 deletions src/NuGetGallery/Content/Site.css
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ a.btn {
color: white;
text-decoration: none;
padding: 1px 6px;
margin: 0px 6px;
display: block;
/* This won't work in IE7, but it will only produce a minor layout quirk */
-moz-box-sizing: border-box;
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Controllers/ErrorsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace NuGetGallery
{
public partial class ErrorsController : Controller
public partial class ErrorsController : AppController
{
public virtual ActionResult NotFound()
{
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Controllers/StatisticsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace NuGetGallery
{
public partial class StatisticsController : Controller
public partial class StatisticsController : AppController
{
private readonly IStatisticsService _statisticsService;
private readonly IAggregateStatsService _aggregateStatsService;
Expand Down
2 changes: 2 additions & 0 deletions src/NuGetGallery/RouteNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ public static class RouteName
public const string ConfirmAccount = "ConfirmAccount";
public const string SubscribeToEmails = "SubscribeToEmails";
public const string UnsubscribeFromEmails = "UnsubscribeFromEmails";
public const string Error500 = "Error500";
public const string Error404 = "Error404";
}
}
2 changes: 1 addition & 1 deletion src/NuGetGallery/Views/NuGetViewBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal static Func<NuGetContext> GetNuGetContextThunk(WebViewPage self)
var ctrl = self.ViewContext.Controller as AppController;
if (ctrl == null)
{
return null;
throw new InvalidOperationException("NuGetViewBase should only be used on views for actions on AppControllers");
}
return ctrl.NuGetContext;
};
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Views/Users/Account.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
@if (hasPassword && credGroups.ContainsKey(CredentialKind.External) && credGroups[CredentialKind.External].Any())
{
<p class="message">
Because you have a third-party account registered you can remove your password below and use
Because you have a Microsoft account registered you can remove your password below and use
that account to sign in to NuGet.org. No more passwords to forget!
</p>
}
Expand Down
1 change: 1 addition & 0 deletions src/NuGetGallery/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
<remove statusCode="500" subStatusCode="-1" />

<!-- Note: The Error.html file is in the ~/Public folder, but the URL Rewrite rules below take ~/Error.html and rewrite it appropriately. -->
<!-- Here, we use an HTML page instead of /Errors/500 because if IIS gets a 500, it's a Bad Time(TM) -->
<error statusCode="500" path="/Error.html" responseMode="ExecuteURL" />
</httpErrors>
<security>
Expand Down

0 comments on commit 34194dd

Please sign in to comment.