public ActionResult AplicationClear(bool Memory, bool Search, bool Images, bool Scripts, bool Styles) { if (LS.CurrentUser.RolesList.Contains("DomainAdmin")) { if (Memory) { CleanCache.CleanOutputCache(); CleanCache.CleanSettingsCache(); } } else { if (Memory) { CleanCache.RestartApplication(); } } if (Search) { CleanCache.CleanSearchCache(); } if (Images) { CleanCache.CleanImageCache(); } if (Scripts) { ScriptHelper.ClearCache(); } if (Styles) { StyleHelper.ClearCache(); } return(RedirectToAction("AplicationClearDone")); }
public ActionResult Edit(int ID, Settings item, List <string> Roles) { if (ModelState.IsValid) { List <string> DomainRoles = SF.GetRoleObjectsList().Where(r => r.IsSystem == true).Select(r => r.Title).ToList(); if (Roles != null) { DomainRoles.AddRange(Roles); } item.Roles = SF.RolesListToString(DomainRoles); _db.Entry(item).State = EntityState.Modified; _db.SaveChanges(); //update lang name of pages AbstractPage ap = _db.AbstractPages.FirstOrDefault(r => r.ID == item.DomainPageID); SF.SetLanguageCode(ap, 100, item.LanguageCode); CleanCache.CleanOutputCache(); CleanCache.CleanSettingsCache(); CleanCache.CleanMenuCache(); return(RedirectToAction("Index")); } item.Roles = SF.RolesListToString(Roles); return(View(item)); }
public ActionResult Index(int ID, Settings s, int DomainPageID) { if (ModelState.IsValid) { if (SF.UseMultiDomain()) { s.Domain = "Default"; } _db.Entry(s).State = EntityState.Modified; _db.SaveChanges(); CleanCache.CleanSettingsCache(); return(RedirectToAction("Index", "Main")); } else { return(View(s)); } }