Fixes merge issues

This commit is contained in:
Shannon Deminick
2013-04-02 23:08:43 +06:00
parent a7e939e71f
commit 182107286c
6 changed files with 9 additions and 24 deletions

View File

@@ -29,9 +29,7 @@ namespace Umbraco.Tests.TestHelpers
{
base.Initialize();
}
//init the singleton too!
ApplicationContext.Current = ApplicationContext;
[TearDown]
public override void TearDown()
{

View File

@@ -334,7 +334,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
if (_previewContent == null)
{
_previewContent = new PreviewContent(user, new Guid(global::umbraco.BusinessLogic.StateHelper.Cookies.Preview.GetValue()), true);
_previewContent = new PreviewContent(user, new Guid(StateHelper.Cookies.Preview.GetValue()), true);
if (_previewContent.ValidPreviewSet)
_previewContent.LoadPreviewset();
}

View File

@@ -467,9 +467,6 @@
<Compile Include="umbraco.presentation\umbraco\cacheBrowser.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\create.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\canvas.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>

View File

@@ -5,6 +5,7 @@ using Umbraco.Core.Services;
using Umbraco.Core.CodeAnnotations;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.Security;
using umbraco;
using umbraco.IO;
using umbraco.presentation;
@@ -314,7 +315,7 @@ namespace Umbraco.Web
{
get
{
return UmbracoEnsuredPage.CurrentUser;
return WebSecurity.CurrentUser;
}
}
@@ -335,7 +336,7 @@ namespace Umbraco.Web
return
StateHelper.Cookies.Preview.HasValue // has preview cookie
&& UmbracoUser != null // has user
&& !currentUrl.StartsWith(Umbraco.Core.IO.IOHelper.ResolveUrl(Umbraco.Core.IO.SystemDirectories.Umbraco)); // is not in admin UI
&& !currentUrl.StartsWith(Core.IO.IOHelper.ResolveUrl(Core.IO.SystemDirectories.Umbraco)); // is not in admin UI
}
private HttpRequestBase GetRequestFromContext()

View File

@@ -10,6 +10,7 @@ using System.Xml;
using Umbraco.Core.Macros;
using Umbraco.Web;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.PublishedCache.XmlPublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.Templates;
using umbraco.cms.businesslogic;
@@ -100,7 +101,9 @@ namespace umbraco.presentation.templateControls
if (tempNodeId != null && tempNodeId.Value != 0)
{
//moved the following from the catch block up as this will allow fallback options alt text etc to work
var itemPage = new page(Umbraco.Web.UmbracoContext.Current.GetXml().GetElementById(tempNodeId.ToString()));
var xml = ((PublishedContentCache) PublishedContentCacheResolver.Current.ContentCache)
.GetXml(Umbraco.Web.UmbracoContext.Current);
var itemPage = new page(xml.GetElementById(tempNodeId.ToString()));
tempElementContent = new item(itemPage.Elements, item.LegacyAttributes).FieldContent;
}
}

View File

@@ -105,15 +105,6 @@ namespace umbraco.cms.businesslogic.language
}
}
}
}
{
var ct = new Language();
ct.PopulateFromReader(dr);
ct.OnNew(new NewEventArgs());
}
}
}
}
}
@@ -129,11 +120,6 @@ namespace umbraco.cms.businesslogic.language
}
}
private static void InvalidateCache()
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(UmbracoLanguageCacheKey);
}
/// <summary>
/// Returns all installed languages
/// </summary>