Trying AGAIN to fix this stupid cache and session thing in Mono
This commit is contained in:
+23
-18
@@ -22,23 +22,6 @@ namespace Activizr
|
||||
|
||||
this.LanguageSelector.LanguageChanged += new EventHandler(LanguageSelector_LanguageChanged);
|
||||
|
||||
// Read build number if not loaded, or set to "Private" if none
|
||||
|
||||
if (_buildIdentity == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/BuildIdentity.txt")))
|
||||
{
|
||||
_buildIdentity = "Build " + reader.ReadLine();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_buildIdentity = "Private Build";
|
||||
}
|
||||
}
|
||||
|
||||
// Titles etc
|
||||
|
||||
this.IconPage.ImageUrl = "/Images/PageIcons/" + this.CurrentPageIcon + "-40px.png";
|
||||
@@ -161,7 +144,7 @@ namespace Activizr
|
||||
|
||||
if (item.Text == "Build# Auto")
|
||||
{
|
||||
item.Text = _buildIdentity;
|
||||
item.Text = GetBuildIdentity();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -186,6 +169,28 @@ namespace Activizr
|
||||
return anyItemEnabled;
|
||||
}
|
||||
|
||||
private string GetBuildIdentity()
|
||||
{
|
||||
// Read build number if not loaded, or set to "Private" if none
|
||||
|
||||
if (_buildIdentity == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/BuildIdentity.txt")))
|
||||
{
|
||||
_buildIdentity = "Build " + reader.ReadLine();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_buildIdentity = "Private Build";
|
||||
}
|
||||
}
|
||||
|
||||
return _buildIdentity;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (Convert.ToInt32(item.Attributes["UserLevel"]) < 4) // TODO: user's menu level
|
||||
|
||||
Reference in New Issue
Block a user