You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
803 B
34 lines
803 B
using System.Composition;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace GitCandy.Controllers
|
|
{
|
|
[Export(typeof(HomeController))]
|
|
public class HomeController : CandyControllerBase
|
|
{
|
|
public ActionResult Index()
|
|
{
|
|
return RedirectToStartPage();
|
|
}
|
|
|
|
[AllowAnonymous]
|
|
public ActionResult About()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[AllowAnonymous]
|
|
public ActionResult Language(string lang)
|
|
{
|
|
var cookie = new HttpCookie("Lang", lang);
|
|
Response.Cookies.Set(cookie);
|
|
|
|
Session["Culture"] = null;
|
|
|
|
if (Request.UrlReferrer == null)
|
|
return RedirectToStartPage();
|
|
return Redirect(Request.UrlReferrer.PathAndQuery);
|
|
}
|
|
}
|
|
}
|