From 9f6d2fa3174fdbdce3fc90a360bb9056757b8474 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 10 Dec 2011 23:18:51 +0000 Subject: [PATCH] Wtf, testing AGAIN --- Site5/Master-v5.master.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Site5/Master-v5.master.cs b/Site5/Master-v5.master.cs index d1519586..1bbf2abf 100644 --- a/Site5/Master-v5.master.cs +++ b/Site5/Master-v5.master.cs @@ -24,18 +24,18 @@ namespace Activizr // Read build number if not loaded, or set to "Private" if none - if (HttpContext.Current.Application["BuildIdentity"] == null) + if (_buildIdentity == null) { try { using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/BuildIdentity.txt"))) { - HttpContext.Current.Application["BuildIdentity"] = "Build " + reader.ReadLine(); + _buildIdentity = "Build " + reader.ReadLine(); } } catch (Exception) { - HttpContext.Current.Application["BuildIdentity"] = "Private Build"; + _buildIdentity = "Private Build"; } } @@ -104,6 +104,7 @@ namespace Activizr private Person _viewingPerson; private Authority _authority; + private static string _buildIdentity; private void Localize() @@ -160,7 +161,7 @@ namespace Activizr if (item.Text == "Build# Auto") { - item.Text = (string) HttpContext.Current.Application["BuildIdentity"]; + item.Text = _buildIdentity; } else {