Fixed theme detection when opening a namespace with incorrect casing.

This commit is contained in:
Dario Solera 2009-10-19 07:18:43 +00:00
parent 462716961d
commit ab22f73cbb
3 changed files with 6 additions and 6 deletions

View file

@ -763,6 +763,7 @@ namespace ScrewTurn.Wiki {
/// <param name="nspace">The namespace (<c>null</c> for the root).</param>
/// <returns>The theme name.</returns>
public static string GetTheme(string nspace) {
if(!string.IsNullOrEmpty(nspace)) nspace = Pages.FindNamespace(nspace).Name;
string propertyName = "Theme" + (!string.IsNullOrEmpty(nspace) ? "-" + nspace : "");
return GetString(Provider.GetSetting(propertyName), "Default");
}
@ -773,6 +774,7 @@ namespace ScrewTurn.Wiki {
/// <param name="nspace">The namespace (<c>null</c> for the root).</param>
/// <param name="theme">The theme name.</param>
public static void SetTheme(string nspace, string theme) {
if(!string.IsNullOrEmpty(nspace)) nspace = Pages.FindNamespace(nspace).Name;
string propertyName = "Theme" + (!string.IsNullOrEmpty(nspace) ? "-" + nspace : "");
Provider.SetSetting(propertyName, theme);
}