public ActionResult Step3(SettingsSummary summary) { if (RoadkillSettings.Installed) return RedirectToAction("Index", "Home"); return View(summary); }
public ActionResult Step3b(SettingsSummary summary) { if (RoadkillSettings.Installed) return RedirectToAction("Index", "Home"); summary.LdapConnectionString = "LDAP://"; summary.EditorRoleName = "Editor"; summary.AdminRoleName = "Admin"; if (summary.UseWindowsAuth) return View("Step3WindowsAuth", summary); else return View("Step3Database",summary); }
public ActionResult Step4(SettingsSummary summary) { if (RoadkillSettings.Installed) return RedirectToAction("Index", "Home"); summary.AllowedExtensions = "jpg,png,gif,zip,xml,pdf"; summary.AttachmentsFolder = "~/Attachments"; summary.MarkupType = "Creole"; summary.Theme = "Mediawiki"; summary.CacheEnabled = true; summary.CacheText = true; return View(summary); }
public ActionResult Step5(SettingsSummary summary) { if (RoadkillSettings.Installed) return RedirectToAction("Index", "Home"); try { // Any missing values are handled by data annotations. Those that are missed // can be seen as fiddling errors which are down to the user. if (ModelState.IsValid) { // Update the web.config first, so all connections can be referenced. SettingsManager.SaveWebConfigSettings(summary); // Create the roadkill schema and save the configuration settings SettingsManager.CreateTables(summary); SettingsManager.SaveSiteConfiguration(summary, true); // Add a user if we're not using AD. if (!summary.UseWindowsAuth) { Install.AddAdminUser(summary); } // Create a blank search index SearchManager.Current.CreateIndex(); } } catch (Exception e) { try { Install.ResetInstalledState(); } catch (Exception ex) { ModelState.AddModelError("An error ocurred installing", ex.Message + e); } ModelState.AddModelError("An error ocurred installing", e.Message + e); } return View(summary); }
public ActionResult Index(SettingsSummary summary) { if (ModelState.IsValid) { SettingsManager.SaveWebConfigSettings(summary); SettingsManager.SaveSiteConfiguration(summary, false); } return View(summary); }