From e3fa12bcc73876d7653da43dcd6e18b6a3ef4bda Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 6 Dec 2012 15:53:29 -0800 Subject: [PATCH] Fixing script dependencies when file don't exist In this case scripts would be rendered using the standard Script shape and would be rendered in another step, breaking dependency order. Work Item: 19255 --HG-- branch : 1.x --- src/Orchard.Web/Core/Shapes/CoreShapes.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Core/Shapes/CoreShapes.cs b/src/Orchard.Web/Core/Shapes/CoreShapes.cs index 17f0c9ed4..6c810015a 100644 --- a/src/Orchard.Web/Core/Shapes/CoreShapes.cs +++ b/src/Orchard.Web/Core/Shapes/CoreShapes.cs @@ -342,8 +342,9 @@ namespace Orchard.Core.Shapes { } [Shape] - public void Script(TextWriter Output, ResourceDefinition Resource, string Url, string Condition, Dictionary TagAttributes) { - ResourceManager.WriteResource(Output, Resource, Url, Condition, TagAttributes); + public void Script(HtmlHelper Html, TextWriter Output, ResourceDefinition Resource, string Url, string Condition, Dictionary TagAttributes) { + // do not write to Output directly as Styles are rendered in Zones + ResourceManager.WriteResource(Html.ViewContext.Writer, Resource, Url, Condition, TagAttributes); } [Shape]