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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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///");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user