DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB

Fixing generation of parent types in linq to umbraco

[TFS Changeset #64219]
This commit is contained in:
slace
2010-02-27 00:18:22 +00:00
parent 81d10109bf
commit 8052143be3
2 changed files with 7 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ namespace umbraco.presentation
receivedQuery.Length - ampPos - 1);
}
// get umbPage out of query string (9 = "&umbPage".Length() + 1)
path = receivedQuery.Substring(9, ampPos - 9);
path = receivedQuery.Substring(9, ampPos - 9); //this will fail if there are < 9 characters before the &umbPage query string
}
else
{

View File

@@ -249,7 +249,7 @@ namespace {0} {{
if (dt.MasterContentType > 0)
{
var parent = DocTypes.First(d => d.Id == dt.MasterContentType);
baseType = GenerateTypeName(dt.Alias);
baseType = GenerateTypeName(parent.Alias);
}
sb.AppendLine(string.Format(INTERFACE_TEMPLATE,
@@ -318,7 +318,7 @@ namespace {0} {{
if (dt.MasterContentType > 0)
{
var parent = DocTypes.First(d => d.Id == dt.MasterContentType);
baseType = GenerateTypeName(dt.Alias);
baseType = GenerateTypeName(parent.Alias);
}
sb.Append(string.Format(CLASS_TEMPLATE,
@@ -476,6 +476,10 @@ namespace {0} {{
private static string FormatForComment(string s)
{
if (string.IsNullOrEmpty(s))
{
return s;
}
return s.Replace("\r\n", "\r\n///");
}
}