DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB
More fixes that are unrelated to any testing from cg09 :| [TFS Changeset #55266]
This commit is contained in:
@@ -64,9 +64,13 @@ namespace umbraco.Linq.Core
|
||||
{
|
||||
var attr = ReflectionAssistance.GetumbracoInfoAttribute(p);
|
||||
|
||||
var data = xml.Elements("data").Single(x => (string)x.Attribute("alias") == attr.Alias);
|
||||
var data = xml.Elements("data").Single(x => (string)x.Attribute("alias") == attr.Alias).Value;
|
||||
if (p.PropertyType == typeof(int) && string.IsNullOrEmpty(data))
|
||||
{
|
||||
data = "-1";
|
||||
}
|
||||
// TODO: Address how Convert.ChangeType works in globalisation
|
||||
p.SetValue(this, Convert.ChangeType(data.Value, p.PropertyType), null);
|
||||
p.SetValue(this, Convert.ChangeType(data, p.PropertyType), null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace umbraco.Linq.Core.Node
|
||||
/// Initializes a new instance of the <see cref="NodeDataProvider"/> class using umbraco settings as XML path
|
||||
/// </summary>
|
||||
public NodeDataProvider()
|
||||
: this(System.Web.HttpContext.Current.Server.MapPath(umbraco.GlobalSettings.Path))
|
||||
: this(umbraco.presentation.UmbracoContext.Current.Server.MapPath(umbraco.presentation.UmbracoContext.Current.Server.ContentXmlPath))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<umbracoPresentationPath>..\..\..\..\..\umbraco\presentation\bin</umbracoPresentationPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\..\..\..\umbraco\presentation\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -55,6 +56,11 @@
|
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\foreign dlls\System.Web.Abstractions.dll</HintPath>
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
@@ -91,13 +97,16 @@
|
||||
<Project>{E469A9CE-1BEC-423F-AC44-713CD72457EA}</Project>
|
||||
<Name>umbraco.businesslogic</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\umbraco\presentation\umbraco.presentation.csproj">
|
||||
<Project>{651E1350-91B6-44B7-BD60-7207006D7003}</Project>
|
||||
<Name>umbraco.presentation</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
</Target>-->
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -3,14 +3,51 @@ using System.Web;
|
||||
using umbraco.presentation.LiveEditing;
|
||||
using umbraco.BasePages;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace umbraco.presentation
|
||||
{
|
||||
public class UmbracoServerUtility : HttpServerUtilityWrapper
|
||||
{
|
||||
private HttpServerUtility m_Server;
|
||||
|
||||
public UmbracoServerUtility(HttpServerUtility server) : base(server)
|
||||
{
|
||||
m_Server = server;
|
||||
}
|
||||
|
||||
public string UmbracoPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return GlobalSettings.Path;
|
||||
}
|
||||
}
|
||||
|
||||
public string ContentXmlPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return GlobalSettings.ContentXML;
|
||||
}
|
||||
}
|
||||
|
||||
public XDocument ContentXml
|
||||
{
|
||||
get
|
||||
{
|
||||
return XDocument.Load(this.ContentXmlPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Class that encapsulates Umbraco information of a specific HTTP request.
|
||||
/// </summary>
|
||||
public class UmbracoContext
|
||||
{
|
||||
private UmbracoServerUtility m_Server;
|
||||
private UmbracoRequest m_Request;
|
||||
private UmbracoResponse m_Response;
|
||||
private HttpContext m_HttpContext;
|
||||
|
||||
/// <summary>
|
||||
@@ -104,7 +141,11 @@ namespace umbraco.presentation
|
||||
{
|
||||
get
|
||||
{
|
||||
return new UmbracoResponse(this.m_HttpContext.Response);
|
||||
if (m_Response == null)
|
||||
{
|
||||
m_Response = new UmbracoResponse(this.m_HttpContext.Response);
|
||||
}
|
||||
return m_Response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +157,11 @@ namespace umbraco.presentation
|
||||
{
|
||||
get
|
||||
{
|
||||
return new UmbracoRequest(this.m_HttpContext.Request);
|
||||
if (m_Request == null)
|
||||
{
|
||||
m_Request = new UmbracoRequest(this.m_HttpContext.Request);
|
||||
}
|
||||
return m_Request;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,5 +173,17 @@ namespace umbraco.presentation
|
||||
{
|
||||
return this.Request.Url.GetLeftPart(UriPartial.Authority);
|
||||
}
|
||||
|
||||
public virtual UmbracoServerUtility Server
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Server == null)
|
||||
{
|
||||
m_Server = new UmbracoServerUtility(this.m_HttpContext.Server);
|
||||
}
|
||||
return m_Server;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{651E1350-91B6-44B7-BD60-7207006D7003}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
@@ -354,8 +354,8 @@
|
||||
<DependentUpon>editContent.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\actions\preview.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>preview.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\actions\preview.aspx.designer.cs">
|
||||
<DependentUpon>preview.aspx</DependentUpon>
|
||||
@@ -667,8 +667,8 @@
|
||||
<DependentUpon>Boost.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\developer\Packages\BrowseRepository.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>BrowseRepository.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\developer\Packages\BrowseRepository.aspx.designer.cs">
|
||||
<DependentUpon>BrowseRepository.aspx</DependentUpon>
|
||||
@@ -689,8 +689,8 @@
|
||||
<DependentUpon>editPackage.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\developer\Packages\installedPackage.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>installedPackage.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\developer\Packages\installedPackage.aspx.designer.cs">
|
||||
<DependentUpon>installedPackage.aspx</DependentUpon>
|
||||
@@ -710,8 +710,8 @@
|
||||
<DependentUpon>SubmitPackage.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\developer\Python\editPython.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>editPython.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\developer\Python\editPython.aspx.designer.cs">
|
||||
<DependentUpon>editPython.aspx</DependentUpon>
|
||||
@@ -798,8 +798,8 @@
|
||||
<DependentUpon>editMacro.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\dialogs\emptyTrashcan.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>emptyTrashcan.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\dialogs\emptyTrashcan.aspx.designer.cs">
|
||||
<DependentUpon>emptyTrashcan.aspx</DependentUpon>
|
||||
@@ -1199,8 +1199,8 @@
|
||||
<DependentUpon>publishStatus.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\reindex.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>reindex.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco\reindex.aspx.designer.cs">
|
||||
<DependentUpon>reindex.aspx</DependentUpon>
|
||||
|
||||
Reference in New Issue
Block a user