mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge remote-tracking branch 'refs/remotes/origin/1.9.x' into issue/6107
This commit is contained in:
@@ -84,9 +84,10 @@ namespace Orchard.Blogs {
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("WidgetPart")
|
||||
.WithSetting("Stereotype", "Widget")
|
||||
.WithPart("IdentityPart")
|
||||
);
|
||||
|
||||
return 6;
|
||||
return 7;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
@@ -133,5 +134,14 @@ namespace Orchard.Blogs {
|
||||
|
||||
return 6;
|
||||
}
|
||||
|
||||
public int UpdateFrom6() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("BlogArchives",
|
||||
cfg => cfg
|
||||
.WithPart("IdentityPart")
|
||||
);
|
||||
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
}
|
@@ -274,5 +274,14 @@ namespace Orchard.Projections {
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int UpdateFrom3() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("NavigationQueryMenuItem",
|
||||
cfg => cfg
|
||||
.WithPart("IdentityPart")
|
||||
);
|
||||
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
}
|
@@ -59,7 +59,7 @@ namespace Orchard.Tokens.Implementation {
|
||||
private static Tuple<string, IEnumerable<string>> Parse(string text, bool hashMode) {
|
||||
var tokens = new List<string>();
|
||||
if (!String.IsNullOrEmpty(text)) {
|
||||
var inToken = false;
|
||||
var inTokenDepth = 0;
|
||||
var tokenStart = 0;
|
||||
for (var i = 0; i < text.Length; i++) {
|
||||
var c = text[i];
|
||||
@@ -70,29 +70,32 @@ namespace Orchard.Tokens.Implementation {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (c == '}' && !(inToken)) {
|
||||
else if (c == '}' && inTokenDepth == 0) {
|
||||
if (i + 1 < text.Length && text[i + 1] == '}') {
|
||||
text = text.Substring(0, i) + text.Substring(i + 1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (inToken) {
|
||||
if (inTokenDepth > 0) {
|
||||
if (c == '}') {
|
||||
inToken = false;
|
||||
var token = text.Substring(tokenStart + 1, i - tokenStart - 1);
|
||||
tokens.Add(token);
|
||||
inTokenDepth--;
|
||||
if (inTokenDepth == 0) {
|
||||
var token = text.Substring(tokenStart + 1, i - tokenStart - 1);
|
||||
tokens.Add(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!hashMode && c == '{') {
|
||||
inToken = true;
|
||||
tokenStart = i;
|
||||
|
||||
if (!hashMode && c == '{') {
|
||||
if (inTokenDepth == 0) tokenStart = i;
|
||||
inTokenDepth++;
|
||||
}
|
||||
else if (hashMode && c == '#'
|
||||
&& i + 1 < text.Length && text[i + 1] == '{'
|
||||
&& (i + 2 > text.Length || text[i + 2] != '{') ) {
|
||||
inToken = true;
|
||||
tokenStart = i+1;
|
||||
&& (i + 2 > text.Length || text[i + 2] != '{') ) {
|
||||
if (inTokenDepth == 0) tokenStart = i+1;
|
||||
inTokenDepth++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,8 @@ namespace Orchard.Widgets {
|
||||
widget.Classes.Add("widget-" + widgetPart.Name);
|
||||
|
||||
// Widget__Name__[Name]
|
||||
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name);
|
||||
// Replacing dashes to shape type-compatible double underscores.
|
||||
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name.Replace("-", "__"));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@
|
||||
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
|
||||
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
|
||||
<TargetFrameworkProfile />
|
||||
<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -239,7 +240,7 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
<!-- 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> -->
|
||||
@@ -280,4 +281,4 @@
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
-->
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@@ -15,6 +15,8 @@ namespace Orchard.ContentManagement {
|
||||
|
||||
ContentItem IContent.ContentItem { get { return this; } }
|
||||
|
||||
public dynamic Content { get { return (dynamic)this; } }
|
||||
|
||||
public int Id { get { return Record == null ? 0 : Record.Id; } }
|
||||
public int Version { get { return VersionRecord == null ? 0 : VersionRecord.Number; } }
|
||||
|
||||
|
@@ -57,6 +57,7 @@ namespace Orchard.Mvc {
|
||||
var baseUrl = new Func<string>(() => siteService.GetSiteSettings().BaseUrl);
|
||||
var httpContextBase = new HttpContextPlaceholder(baseUrl);
|
||||
|
||||
context.Resolve<IWorkContextAccessor>().CreateWorkContextScope(httpContextBase);
|
||||
return httpContextBase;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user