diff --git a/.hgignore b/.hgignore index 71050adcb1..fb3237c506 100644 --- a/.hgignore +++ b/.hgignore @@ -44,6 +44,7 @@ src\Umbraco.Web.UI\[Mm]acro[Ss]cripts\* src\Umbraco.Web.UI\[Xx]slt\* src\Umbraco.Web.UI\[Ii]mages\* src\Umbraco.Web.UI\[Ss]cripts\* +src\Umbraco.Web.UI\Web.*.config.transformed umbraco\presentation\umbraco\plugins\uComponents\uComponentsInstaller.ascx umbraco\presentation\packages\uComponents\MultiNodePicker\CustomTreeService.asmx diff --git a/src/Umbraco.Core/CoreBootManager.cs b/src/Umbraco.Core/CoreBootManager.cs index 6110973949..9c1b75519e 100644 --- a/src/Umbraco.Core/CoreBootManager.cs +++ b/src/Umbraco.Core/CoreBootManager.cs @@ -168,6 +168,14 @@ namespace Umbraco.Core return this; } + /// + /// Freeze resolution to not allow Resolvers to be modified + /// + protected virtual void FreezeResolution() + { + Resolution.Freeze(); + } + /// /// Freeze resolution to not allow Resolvers to be modified /// diff --git a/src/Umbraco.Web.UI/Web.Debug.config.transformed b/src/Umbraco.Web.UI/Web.Debug.config.transformed deleted file mode 100644 index 22653b7bcc..0000000000 --- a/src/Umbraco.Web.UI/Web.Debug.config.transformed +++ /dev/null @@ -1,274 +0,0 @@ - - - -
-
- -
- -
-
-
-
-
-
- -
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/bin.zip b/src/Umbraco.Web.UI/bin.zip deleted file mode 100644 index fe6fdc2309..0000000000 Binary files a/src/Umbraco.Web.UI/bin.zip and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo.css b/src/Umbraco.Web.UI/fonts/museo/museo.css deleted file mode 100644 index f3d025d612..0000000000 --- a/src/Umbraco.Web.UI/fonts/museo/museo.css +++ /dev/null @@ -1,20 +0,0 @@ -/* Generated by Font Squirrel (http://www.fontsquirrel.com) on November 13, 2010 */ - - - -@font-face { - font-family: 'Museo700'; - src: url('museo700-regular-webfont.eot'); - src: url('museo700-regular-webfont.woff') format('woff'), url('museo700-regular-webfont.ttf') format('truetype'),url('museo700-regular-webfont.svgz#webfont2nqRdrT9') format('svg'), url('museo700-regular-webfont.svg#webfont2nqRdrT9') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'Museo300'; - src: url('museo300-regular-webfont.eot'); - src: url('museo300-regular-webfont.woff') format('woff'), url('museo300-regular-webfont.svgz#webfontMsAuFuwO') format('svg'), url('museo300-regular-webfont.svg#webfontMsAuFuwO') format('svg'); - font-weight: normal; - font-style: normal; -} - diff --git a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.eot b/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.eot deleted file mode 100644 index 743780a9b3..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.eot and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.svg b/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.svg deleted file mode 100644 index 31072e68ff..0000000000 --- a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.svg +++ /dev/null @@ -1,253 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Copyright c 2008 by Jos Buivengaexljbris All rights reserved -Designer : Jos Buivenga -Foundry : Jos Buivenga -Foundry URL : httpwwwjosbuivengademonnl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.svgz b/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.svgz deleted file mode 100644 index 5487f553f0..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.svgz and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.ttf b/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.ttf deleted file mode 100644 index 9074ccd0c2..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.ttf and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.woff b/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.woff deleted file mode 100644 index 2f8b2da12d..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo300-regular-webfont.woff and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.eot b/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.eot deleted file mode 100644 index 5244d9c2a8..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.eot and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.svg b/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.svg deleted file mode 100644 index cf8245e031..0000000000 --- a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.svg +++ /dev/null @@ -1,253 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Copyright c 2008 by Jos Buivengaexljbris All rights reserved -Designer : Jos Buivenga -Foundry : Jos Buivenga -Foundry URL : httpwwwjosbuivengademonnl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.svgz b/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.svgz deleted file mode 100644 index d09aca8535..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.svgz and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.ttf b/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.ttf deleted file mode 100644 index beb4426491..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.ttf and /dev/null differ diff --git a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.woff b/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.woff deleted file mode 100644 index 2a58318708..0000000000 Binary files a/src/Umbraco.Web.UI/fonts/museo/museo700-regular-webfont.woff and /dev/null differ diff --git a/src/Umbraco.Web.UI/usercontrols/Blog/AjaxCommentForm.ascx b/src/Umbraco.Web.UI/usercontrols/Blog/AjaxCommentForm.ascx deleted file mode 100644 index f2318ca9a4..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/Blog/AjaxCommentForm.ascx +++ /dev/null @@ -1,108 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AjaxCommentForm.ascx.cs" Inherits="Runway.Blog.usercontrols.AjaxCommentForm" %> - - - -

- <%= CommentsClosedMessage %> -

-
- - -
- - -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- " /> -
-
- - - - - - - -
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/usercontrols/Blog/BlogInstaller.ascx b/src/Umbraco.Web.UI/usercontrols/Blog/BlogInstaller.ascx deleted file mode 100644 index a2a92bd769..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/Blog/BlogInstaller.ascx +++ /dev/null @@ -1,42 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BlogInstaller.ascx.cs" Inherits="Runway.Blog.usercontrols.BlogInstaller" %> -<%@ Register Namespace="umbraco.uicontrols" Assembly="controls" TagPrefix="umb" %> - - -

- Installation complete! you can now go to the content section and start blogging directly from the dashboard. -

- -

- Or you can view your blog -

-
- - - - -

- Runway Blog has been installed -

-
    -
  • Document types and templates have been added
  • -
  • Macros and xslt-files have been setup
  • -
  • A test blog has been created
  • -
-

- All you need to do now is give it a name and a description, and you can start blogging right away. -

-
- - - - - - - - - - - - - -
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/usercontrols/Blog/CommentModeration.ascx b/src/Umbraco.Web.UI/usercontrols/Blog/CommentModeration.ascx deleted file mode 100644 index 6ed0e6ba8f..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/Blog/CommentModeration.ascx +++ /dev/null @@ -1,147 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CommentModeration.ascx.cs" Inherits="Runway.Blog.Dashboard.CommentModeration" %> -<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" - Namespace="System.Web.UI" TagPrefix="asp" %> -<%@ Register Namespace="umbraco.uicontrols" Assembly="controls" TagPrefix="umb" %> - - - - - - - - - - - -
- -
-Delete Selected -
- -Approved | -Spam | -All - - -
- -
- - -
- - - - -
- Delete - | -
- -
- -
- -
-

- - - -

- avatar -
- <%# Server.HtmlEncode(Eval("name").ToString()) %> -
- <%# Server.HtmlEncode( Eval("website").ToString()) %> | <%# Server.HtmlEncode(Eval("email").ToString()) %> -

-

- <%# Server.HtmlEncode(Eval("comment").ToString()).Replace("\n","
") %> -

-

- On <%# GetPageDetails(Eval("nodeid")) %> , <%# Eval("created") %> -

-
- - - -
- -
-
-
-
- - - - - <%# Container.DataItem %> - - - - - -
-
-
- -
-
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/usercontrols/MemberPicker.ascx b/src/Umbraco.Web.UI/usercontrols/MemberPicker.ascx deleted file mode 100644 index c73e17174e..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/MemberPicker.ascx +++ /dev/null @@ -1,14 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MemberPicker.ascx.cs" Inherits="Training.Level2.usercontrols.MemberPicker" %> - - - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/usercontrols/Parallel.ascx b/src/Umbraco.Web.UI/usercontrols/Parallel.ascx deleted file mode 100644 index 795df2c126..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/Parallel.ascx +++ /dev/null @@ -1,2 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Parallel.ascx.cs" Inherits="Umbraco.Web.UI.usercontrols.ParallelUserControl" %> - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/usercontrols/Parallel.ascx.cs b/src/Umbraco.Web.UI/usercontrols/Parallel.ascx.cs deleted file mode 100644 index ea3a38f605..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/Parallel.ascx.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.cms.businesslogic.web; -using umbraco.BusinessLogic; - -namespace Umbraco.Web.UI.usercontrols -{ - public partial class ParallelUserControl : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) - { - - } - - protected void Button1_Click(object sender, EventArgs e) - { - ParallelDocumentUpdate test = new ParallelDocumentUpdate(); - test.Execute(); - - } - } - - public class ParallelDocumentUpdate - { - private List documents; - public ParallelDocumentUpdate() - { - documents = new List(); - - documents.Add(new myDocument(1079, "name1", "string1", 1, false, DateTime.Now.AddDays(1))); - documents.Add(new myDocument(1080, "name2", "string2", 2, true, DateTime.Now.AddDays(2))); - documents.Add(new myDocument(1082, "name3", "string3", 3, false, DateTime.Now.AddDays(3))); - documents.Add(new myDocument(1083, "name4", "string4", 4, true, DateTime.Now.AddDays(4))); - documents.Add(new myDocument(1084, "name5", "string5", 5, true, DateTime.Now.AddDays(4))); - - } - - public void Execute() - { - - System.Threading.Tasks.Parallel.ForEach(documents, d => - { - Document doc = new Document(d.Id); - doc.Text = d.Name + " " + d.Id.ToString(); - doc.getProperty("string").Value = d.Prop1 + " " + d.Id.ToString(); - doc.getProperty("int").Value = d.Prop2; - doc.getProperty("bool").Value = d.Prop3; - doc.getProperty("date").Value = d.Prop4; - doc.Publish(User.GetUser(0)); - }); - - } - } - - public class myDocument - { - public myDocument(int id, string name, string prop1, int prop2, bool prop3, DateTime prop4) - { - Id = id; - Name = name; - Prop1 = prop1; - Prop2 = prop2; - Prop3 = prop3; - Prop4 = prop4; - } - - public int Id { get; set; } - public string Name { get; set; } - public string Prop1 { get; set; } - public int Prop2 { get; set; } - public bool Prop3 { get; set; } - public DateTime Prop4 { get; set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/usercontrols/Parallel.ascx.designer.cs b/src/Umbraco.Web.UI/usercontrols/Parallel.ascx.designer.cs deleted file mode 100644 index 334046ec2c..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/Parallel.ascx.designer.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.usercontrols { - - - public partial class ParallelUserControl { - - /// - /// Button1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button Button1; - } -} diff --git a/src/Umbraco.Web.UI/usercontrols/RunwayContactForm/Contact.ascx b/src/Umbraco.Web.UI/usercontrols/RunwayContactForm/Contact.ascx deleted file mode 100644 index 3816d939d0..0000000000 --- a/src/Umbraco.Web.UI/usercontrols/RunwayContactForm/Contact.ascx +++ /dev/null @@ -1,21 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Contact.ascx.cs" Inherits="UmbracoShop.Controls.Contact" %> - - - -
-Your details -

-

-

-
-
-Message -

-

Email send

-
- - - - - - diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 86dbf76259..a8fd495bd1 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -2,6 +2,7 @@ using System.Web; using Umbraco.Core; using Umbraco.Core.Services; +using Umbraco.Core.CodeAnnotations; using Umbraco.Web.Routing; using umbraco; using umbraco.IO; @@ -49,9 +50,35 @@ namespace Umbraco.Web /// during the startup process as well. /// See: http://issues.umbraco.org/issue/U4-1890 /// + [UmbracoProposedPublic("http://issues.umbraco.org/issue/U4-1717")] internal static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext) { - if (UmbracoContext.Current != null) + return EnsureContext(httpContext, applicationContext, false); + } + + /// + /// This is a helper method which is called to ensure that the singleton context is created and the nice url and routing + /// context is created and assigned. + /// + /// + /// + /// + /// if set to true will replace the current singleton with a new one, this is generally only ever used because + /// during application startup the base url domain will not be available so after app startup we'll replace the current + /// context with a new one in which we can access the httpcontext.Request object. + /// + /// + /// The Singleton context object + /// + /// + /// This is created in order to standardize the creation of the singleton. Normally it is created during a request + /// in the UmbracoModule, however this module does not execute during application startup so we need to ensure it + /// during the startup process as well. + /// See: http://issues.umbraco.org/issue/U4-1890 + /// + internal static UmbracoContext EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, bool replaceContext) + { + if (UmbracoContext.Current != null && !replaceContext) return UmbracoContext.Current; var umbracoContext = new UmbracoContext(httpContext, applicationContext, RoutesCacheResolver.Current.RoutesCache); @@ -66,10 +93,10 @@ namespace Umbraco.Web LastChanceLookupResolver.Current.LastChanceLookup, PublishedContentStoreResolver.Current.PublishedContentStore, niceUrls); - + //assign the routing context back umbracoContext.RoutingContext = routingContext; - + //assign the singleton UmbracoContext.Current = umbracoContext; return UmbracoContext.Current; diff --git a/src/Umbraco.Web/UmbracoModule.cs b/src/Umbraco.Web/UmbracoModule.cs index 134f14353f..2e0af2d74e 100644 --- a/src/Umbraco.Web/UmbracoModule.cs +++ b/src/Umbraco.Web/UmbracoModule.cs @@ -50,7 +50,8 @@ namespace Umbraco.Web legacyRequestInitializer.InitializeRequest(); // create the UmbracoContext singleton, one per request, and assign - UmbracoContext.EnsureContext(httpContext, ApplicationContext.Current); + // NOTE: we assign 'true' to ensure the context is replaced if it is already set (i.e. during app startup) + UmbracoContext.EnsureContext(httpContext, ApplicationContext.Current, true); } /// diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index c112fcf1d1..76501df8a7 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -74,6 +74,19 @@ namespace Umbraco.Web return this; } + /// + /// Override this method in order to ensure that the UmbracoContext is also created, this can only be + /// created after resolution is frozen! + /// + protected override void FreezeResolution() + { + base.FreezeResolution(); + + //before we do anything, we'll ensure the umbraco context + //see: http://issues.umbraco.org/issue/U4-1717 + UmbracoContext.EnsureContext(new HttpContextWrapper(_umbracoApplication.Context), ApplicationContext); + } + /// /// Override this method in order to ensure that the UmbracoContext is also created, this can only be /// created after resolution is frozen!