Merge remote-tracking branch 'refs/remotes/OrchardCMS/1.9.x' into 1.9.x

This commit is contained in:
neTp9c
2015-12-01 02:13:55 +03:00
8 changed files with 50 additions and 17 deletions

View File

@@ -4,7 +4,7 @@ Orchard is a free, open source, community-focused Content Management System buil
[![Join the chat at https://gitter.im/OrchardCMS/Orchard](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/OrchardCMS/Orchard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://ms.portal.azure.com/#create/OutercurveFoundation.OrchardCMS.0.5.9)
@@ -21,6 +21,7 @@ Orchard is delivered under the [.NET Foundation](http://www.dotnetfoundation.org
Our mission is to empower our users and foster a dedicated and diverse community that builds the CMS that we all want to use.
## Project Status
Orchard is currently in version 1.9.2. We invite participation by the developer community in shaping the projects direction, so that we can publicly validate our designs and development approach.
Our 1.9.2 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
@@ -31,6 +32,7 @@ Our 1.9.2 release is available from our Downloads page, and is easy to [Install
* [Contact us](mailto:ofeedbk@microsoft.com)
## How To Get Involved
We hope that by engaging with the community we will continue to shape Orchard into a valuable set of tools and applications. The Orchard team is committed to open community participation and accepts code contributions. We encourage community participation at all levels from general project feedback to bug fixes and patches.
There are many ways you can [contribute to Orchard](http://orchardproject.net/contribution):
@@ -46,3 +48,7 @@ There are many ways you can [contribute to Orchard](http://orchardproject.net/co
* [Translate Orchard](http://orchardproject.net/localize)
* [Contribute modules and themes to our gallery](http://gallery.orchardproject.net/)
* [Send us feedback](mailto:ofeedbk@microsoft.com)
## The Future Of Orchard CMS: Orchard 2
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET vNext](http://www.asp.net/vnext). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.

View File

@@ -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;
}
}
}

View File

@@ -274,5 +274,14 @@ namespace Orchard.Projections {
return 3;
}
public int UpdateFrom3() {
ContentDefinitionManager.AlterTypeDefinition("NavigationQueryMenuItem",
cfg => cfg
.WithPart("IdentityPart")
);
return 4;
}
}
}

View File

@@ -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++;
}
}
}

View File

@@ -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("-", "__"));
}
}

View File

@@ -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>

View File

@@ -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; } }

View File

@@ -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;
}