From 165d9c7dff801bd6f45b5cb182cb7f05a40618b9 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Fri, 5 Apr 2013 21:58:13 +0600 Subject: [PATCH 1/6] Fixed nonodes to now show version information and updated it so that it redirects to root if there is actually content so the page is actually not accessible unless you actually have no nodes. --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 7 + .../config/splashes/NoNodes.aspx.cs | 25 ++ .../config/splashes/NoNodes.aspx.designer.cs | 24 ++ .../config/splashes/noNodes.aspx | 250 ++++++++---------- .../BasePages/BasePage.cs | 2 +- 5 files changed, 165 insertions(+), 143 deletions(-) create mode 100644 src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs create mode 100644 src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index c17723647d..0a78e82de8 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -269,6 +269,13 @@ Properties\SolutionInfo.cs + + noNodes.aspx + ASPXCodeBehind + + + noNodes.aspx + ASPXCodeBehind diff --git a/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs new file mode 100644 index 0000000000..503c53a9f3 --- /dev/null +++ b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.WebPages; + +namespace Umbraco.Web.UI.Config.Splashes +{ + public partial class NoNodes : System.Web.UI.Page + { + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + var store = UmbracoContext.Current.RoutingContext.PublishedContentStore; + if (store.HasContent(UmbracoContext.Current)) + { + //if there is actually content, go to the root + Response.Redirect("~/"); + } + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs new file mode 100644 index 0000000000..0063e40629 --- /dev/null +++ b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 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.Config.Splashes { + + + public partial class NoNodes { + + /// + /// Form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm Form1; + } +} diff --git a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx index 03ec792a8a..73bda67d68 100644 --- a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx +++ b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx @@ -1,182 +1,148 @@ -<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %> +<%@ Page Language="C#" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Config.Splashes.NoNodes" CodeBehind="NoNodes.aspx.cs" %> + +<%@ Import Namespace="Umbraco.Core.IO" %> - - - Umbraco - <%=umbraco.GlobalSettings.CurrentVersion%> - - no pages found - + + Umbraco - no pages found - + - + - + - - - + + + - - - - - - + +
- + -
+
-
+
- + - + - + - +
+
+

Looks like there's still work to do

+

+ You're seeing the wonderful page because your website doesn't contain any published content yet. +

+

+ So get rid of this page by starting umbraco and publishing some content. You can do this by clicking the "set up your new website" button below. +

+ +
+
+
+   +
+
+
- -
- - - - -
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- - -
-
- -
- + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/umbraco.businesslogic/BasePages/BasePage.cs b/src/umbraco.businesslogic/BasePages/BasePage.cs index 6889ca929b..ad849847dd 100644 --- a/src/umbraco.businesslogic/BasePages/BasePage.cs +++ b/src/umbraco.businesslogic/BasePages/BasePage.cs @@ -3,10 +3,10 @@ using System.Data; using System.Web; using System.Linq; using System.Web.Security; +using Umbraco.Core.IO; using Umbraco.Core.Logging; using umbraco.BusinessLogic; using umbraco.DataLayer; -using umbraco.IO; using System.Web.UI; namespace umbraco.BasePages From 099b713947cdb65859f935deffa7472e65d47e63 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Fri, 5 Apr 2013 22:29:45 +0600 Subject: [PATCH 2/6] Fixed ValidateProxyUrl to check for invalid Urls. --- src/umbraco.cms/helpers/url.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/umbraco.cms/helpers/url.cs b/src/umbraco.cms/helpers/url.cs index 3fdc380785..7980527fcc 100644 --- a/src/umbraco.cms/helpers/url.cs +++ b/src/umbraco.cms/helpers/url.cs @@ -1,7 +1,8 @@ using System; using System.Xml; using System.Text.RegularExpressions; -using umbraco.IO; +using Umbraco.Core; +using Umbraco.Core.IO; namespace umbraco.cms.helpers { @@ -44,12 +45,17 @@ namespace umbraco.cms.helpers /// True if it's an allowed url public static bool ValidateProxyUrl(string url, string callerUrl) { + if (!Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute)) + { + return false; + } + Uri requestUri; - Uri localUri; if (Uri.TryCreate(url, UriKind.RelativeOrAbsolute, out requestUri)) { - if (!String.IsNullOrEmpty(callerUrl)) + if (!string.IsNullOrEmpty(callerUrl)) { + Uri localUri; if (Uri.TryCreate(callerUrl, UriKind.RelativeOrAbsolute, out localUri)) { // check for local urls @@ -60,18 +66,21 @@ namespace umbraco.cms.helpers } else { + //TODO: SD: why throw an exception?? shouldn't we just return false ? throw new ArgumentException("CallerUrl is in a wrong format that couldn't be parsed as a valid URI. If you don't want to evaluate for local urls, but just proxy urls then leave callerUrl empty", "callerUrl"); } } // check for valid proxy urls - var feedProxyXml = xmlHelper.OpenAsXmlDocument(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); + var feedProxyXml = XmlHelper.OpenAsXmlDocument(IOHelper.MapPath(SystemFiles.FeedProxyConfig)); if (feedProxyXml != null && feedProxyXml.SelectSingleNode(string.Concat("//allow[@host = '", requestUri.Host, "']")) != null) { return true; } - } else + } + else { + //TODO: SD: why throw an exception?? shouldn't we just return false ? throw new ArgumentException("url is in a wrong format that couldn't be parsed as a valid URI", "url"); } From 1bd20c9b0647e3d36bcc8dae3111dccad9f5d147 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Fri, 5 Apr 2013 23:28:43 +0600 Subject: [PATCH 3/6] Fixes: #U4-2059 and removes un-needed ping.aspx files, cleans up some code --- src/Umbraco.Core/ApplicationContext.cs | 13 +++++- src/Umbraco.Web.UI/umbraco/ping.aspx | 2 +- src/Umbraco.Web/LegacyScheduledTasks.cs | 4 +- src/Umbraco.Web/Umbraco.Web.csproj | 13 ++---- src/Umbraco.Web/UmbracoModule.cs | 12 +++++- .../umbraco.presentation/keepAliveService.cs | 16 ++++--- .../umbraco.presentation/publishingService.cs | 27 ++++++------ .../umbraco.presentation/umbraco/ping.aspx | 2 - .../umbraco.presentation/umbraco/ping.aspx.cs | 42 +++---------------- .../umbraco/ping.aspx.designer.cs | 15 ------- 10 files changed, 57 insertions(+), 89 deletions(-) delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.designer.cs diff --git a/src/Umbraco.Core/ApplicationContext.cs b/src/Umbraco.Core/ApplicationContext.cs index b0650653fd..f0f3091c7f 100644 --- a/src/Umbraco.Core/ApplicationContext.cs +++ b/src/Umbraco.Core/ApplicationContext.cs @@ -87,6 +87,18 @@ namespace Umbraco.Core } } + /// + /// The original/first url that the web application executes + /// + /// + /// we need to set the initial url in our ApplicationContext, this is so our keep alive service works and this must + /// exist on a global context because the keep alive service doesn't run in a web context. + /// we are NOT going to put a lock on this because locking will slow down the application and we don't really care + /// if two threads write to this at the exact same time during first page hit. + /// see: http://issues.umbraco.org/issue/U4-2059 + /// + internal string OriginalRequestUrl { get; set; } + private bool Configured { get @@ -127,7 +139,6 @@ namespace Umbraco.Core } } - private void AssertIsReady() { if (!this.IsReady) diff --git a/src/Umbraco.Web.UI/umbraco/ping.aspx b/src/Umbraco.Web.UI/umbraco/ping.aspx index d411738f90..945e59c3f8 100644 --- a/src/Umbraco.Web.UI/umbraco/ping.aspx +++ b/src/Umbraco.Web.UI/umbraco/ping.aspx @@ -1,2 +1,2 @@ -<%@ Page language="c#" Codebehind="ping.aspx.cs" AutoEventWireup="True" Inherits="umbraco.presentation.ping" %> +<%@ Page language="c#" Codebehind="ping.aspx.cs" AutoEventWireup="True" Inherits="System.Web.UI.Page" %> I'm alive! \ No newline at end of file diff --git a/src/Umbraco.Web/LegacyScheduledTasks.cs b/src/Umbraco.Web/LegacyScheduledTasks.cs index 1ebf9d7903..1d09ac0832 100644 --- a/src/Umbraco.Web/LegacyScheduledTasks.cs +++ b/src/Umbraco.Web/LegacyScheduledTasks.cs @@ -35,10 +35,10 @@ namespace Umbraco.Web // of course we should have a proper scheduler, see #U4-809 // ping/keepalive - pingTimer = new Timer(new TimerCallback(global::umbraco.presentation.keepAliveService.PingUmbraco), httpApplication.Context, 60000, 300000); + pingTimer = new Timer(new TimerCallback(global::umbraco.presentation.keepAliveService.PingUmbraco), applicationContext, 60000, 300000); // (un)publishing _and_ also run scheduled tasks (!) - publishingTimer = new Timer(new TimerCallback(global::umbraco.presentation.publishingService.CheckPublishing), httpApplication.Context, 30000, 60000); + publishingTimer = new Timer(new TimerCallback(global::umbraco.presentation.publishingService.CheckPublishing), applicationContext, 30000, 60000); // log scrubbing AddTask(LOG_SCRUBBER_TASK_NAME, GetLogScrubbingInterval()); diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 68d4c3c21b..46acd7198f 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -342,6 +342,9 @@ + + ASPXCodeBehind + ASPXCodeBehind @@ -1408,13 +1411,6 @@ Code - - ping.aspx - ASPXCodeBehind - - - ping.aspx - @@ -2043,9 +2039,6 @@ Form - - Form - Designer diff --git a/src/Umbraco.Web/UmbracoModule.cs b/src/Umbraco.Web/UmbracoModule.cs index 8a4d563ea2..f839c74a17 100644 --- a/src/Umbraco.Web/UmbracoModule.cs +++ b/src/Umbraco.Web/UmbracoModule.cs @@ -10,10 +10,10 @@ using System.Web.Mvc; using System.Web.Routing; using System.Web.UI; using Umbraco.Core; +using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Web.Routing; using umbraco; -using umbraco.IO; using GlobalSettings = Umbraco.Core.Configuration.GlobalSettings; using UmbracoSettings = Umbraco.Core.Configuration.UmbracoSettings; @@ -35,6 +35,16 @@ namespace Umbraco.Web /// void BeginRequest(HttpContextBase httpContext) { + //we need to set the initial url in our ApplicationContext, this is so our keep alive service works and this must + //exist on a global context because the keep alive service doesn't run in a web context. + //we are NOT going to put a lock on this because locking will slow down the application and we don't really care + //if two threads write to this at the exact same time during first page hit. + //see: http://issues.umbraco.org/issue/U4-2059 + if (ApplicationContext.Current.OriginalRequestUrl.IsNullOrWhiteSpace()) + { + ApplicationContext.Current.OriginalRequestUrl = string.Format("{0}:{1}{2}", httpContext.Request.ServerVariables["SERVER_NAME"], httpContext.Request.ServerVariables["SERVER_PORT"], IOHelper.ResolveUrl(SystemDirectories.Umbraco)); + } + // do not process if client-side request if (IsClientSideRequest(httpContext.Request.Url)) return; diff --git a/src/Umbraco.Web/umbraco.presentation/keepAliveService.cs b/src/Umbraco.Web/umbraco.presentation/keepAliveService.cs index 44cca4e7e4..4ab1646a9e 100644 --- a/src/Umbraco.Web/umbraco.presentation/keepAliveService.cs +++ b/src/Umbraco.Web/umbraco.presentation/keepAliveService.cs @@ -2,29 +2,35 @@ using System; using System.Diagnostics; using System.Net; using System.Web; +using Umbraco.Core; +using Umbraco.Core.Logging; namespace umbraco.presentation { /// - /// Summary description for keepAliveService. + /// Makes a call to /umbraco/ping.aspx which is used to keep the web app alive /// public class keepAliveService { + //NOTE: sender will be the umbraco ApplicationContext public static void PingUmbraco(object sender) { - if (sender == null) + if (sender == null || !(sender is ApplicationContext)) return; - string url = string.Format("http://{0}/ping.aspx", ((HttpContext)sender).Application["umbracoUrl"]); + + var appContext = (ApplicationContext) sender; + + var url = string.Format("http://{0}/ping.aspx", appContext.OriginalRequestUrl); try { - using (WebClient wc = new WebClient()) + using (var wc = new WebClient()) { wc.DownloadString(url); } } catch(Exception ee) { - Debug.Write(string.Format("Error in ping({0}) -> {1}", url, ee)); + LogHelper.Debug(string.Format("Error in ping({0}) -> {1}", url, ee)); } } } diff --git a/src/Umbraco.Web/umbraco.presentation/publishingService.cs b/src/Umbraco.Web/umbraco.presentation/publishingService.cs index 163da00565..7f99e0c080 100644 --- a/src/Umbraco.Web/umbraco.presentation/publishingService.cs +++ b/src/Umbraco.Web/umbraco.presentation/publishingService.cs @@ -15,14 +15,15 @@ namespace umbraco.presentation /// public class publishingService { - private static Hashtable scheduledTaskTimes = new Hashtable(); - private static bool isPublishingRunning = false; + private static readonly Hashtable ScheduledTaskTimes = new Hashtable(); + private static bool _isPublishingRunning = false; + //NOTE: sender will be the umbraco ApplicationContext public static void CheckPublishing(object sender) { - if(isPublishingRunning) + if(_isPublishingRunning) return; - isPublishingRunning = true; + _isPublishingRunning = true; try { // DO not run publishing if content is re-loading @@ -33,8 +34,6 @@ namespace umbraco.presentation { try { - //d.HttpContext = (HttpContext)sender; - d.ReleaseDate = DateTime.MinValue; //new DateTime(1, 1, 1); // Causes release date to be null d.Publish(d.User); @@ -52,9 +51,7 @@ namespace umbraco.presentation } foreach(Document d in Document.GetDocumentsForExpiration()) { - //d.HttpContext = (HttpContext)sender; - //d.Published = false; - + try { d.ExpireDate = DateTime.MinValue; @@ -86,20 +83,20 @@ namespace umbraco.presentation foreach (XmlNode task in tasks) { bool runTask = false; - if (!scheduledTaskTimes.ContainsKey(task.Attributes.GetNamedItem("alias").Value)) + if (!ScheduledTaskTimes.ContainsKey(task.Attributes.GetNamedItem("alias").Value)) { runTask = true; - scheduledTaskTimes.Add(task.Attributes.GetNamedItem("alias").Value, DateTime.Now); + ScheduledTaskTimes.Add(task.Attributes.GetNamedItem("alias").Value, DateTime.Now); } // Add 1 second to timespan to compensate for differencies in timer else if ( new TimeSpan(DateTime.Now.Ticks - - ((DateTime) scheduledTaskTimes[task.Attributes.GetNamedItem("alias").Value]).Ticks).TotalSeconds + + ((DateTime) ScheduledTaskTimes[task.Attributes.GetNamedItem("alias").Value]).Ticks).TotalSeconds + 1 >= int.Parse(task.Attributes.GetNamedItem("interval").Value)) { runTask = true; - scheduledTaskTimes[task.Attributes.GetNamedItem("alias").Value] = DateTime.Now; + ScheduledTaskTimes[task.Attributes.GetNamedItem("alias").Value] = DateTime.Now; } if (runTask) @@ -126,13 +123,13 @@ namespace umbraco.presentation } finally { - isPublishingRunning = false; + _isPublishingRunning = false; } } private static bool getTaskByHttp(string url) { - HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url); + var myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse myHttpWebResponse = null; try { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx deleted file mode 100644 index d411738f90..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx +++ /dev/null @@ -1,2 +0,0 @@ -<%@ Page language="c#" Codebehind="ping.aspx.cs" AutoEventWireup="True" Inherits="umbraco.presentation.ping" %> -I'm alive! \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.cs index 21aa5229b5..71d56511e4 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -11,40 +11,8 @@ using System.Web.UI.HtmlControls; namespace umbraco.presentation { - /// - /// Summary description for ping. - /// - public partial class ping : System.Web.UI.Page - { - protected void Page_Load(object sender, System.EventArgs e) - { - /* - if (GlobalSettings.DebugMode) - BusinessLogic.Log.Add( - BusinessLogic.LogTypes.Ping, - BusinessLogic.User.GetUser(0), - -1, - ""); - */ - } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - } - #endregion - } + [Obsolete("This class is no longer used and will be removed in future versions")] + public partial class ping : System.Web.UI.Page + { + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.designer.cs deleted file mode 100644 index 7154280a25..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/ping.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation { - - public partial class ping { - } -} From f936f8b0dd57ecc1e59539a71e82dde8cad7660f Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Fri, 5 Apr 2013 23:40:02 +0600 Subject: [PATCH 4/6] updates install utility to throw exception if the app is configured already. --- .../umbraco.presentation/install/utills/p.aspx.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Web/umbraco.presentation/install/utills/p.aspx.cs b/src/Umbraco.Web/umbraco.presentation/install/utills/p.aspx.cs index 8f27a85dd7..c216c7131f 100644 --- a/src/Umbraco.Web/umbraco.presentation/install/utills/p.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/install/utills/p.aspx.cs @@ -16,6 +16,12 @@ namespace umbraco.presentation.install.utills protected void Page_Load(object sender, EventArgs e) { + //if its not configured then we can continue + if (ApplicationContext.Current == null || ApplicationContext.Current.IsConfigured) + { + throw new AuthenticationException("The application is already configured"); + } + // Stop Caching in IE Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); From bf3fa20a53ddc2da5fefeee4fd47e993e9ac65a4 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Sat, 6 Apr 2013 00:04:23 +0600 Subject: [PATCH 5/6] Cleaned up the code fro rsd and wlwmanifest and ensures wlwmanifest actually returns the results in xml format. --- src/Umbraco.Web.UI/umbraco/channels/rsd.aspx | 17 +++++++--- .../umbraco/channels/wlwmanifest.aspx | 31 ++++++++++++++++--- .../settings/modals/ShowUmbracoTags.aspx | 5 +-- src/Umbraco.Web/Umbraco.Web.csproj | 26 ++++++---------- .../umbraco/channels/rsd.aspx | 11 ------- .../umbraco/channels/rsd.aspx.cs | 3 +- .../umbraco/channels/rsd.aspx.designer.cs | 15 --------- .../umbraco/channels/wlwmanifest.aspx | 28 ----------------- .../umbraco/channels/wlwmanifest.aspx.cs | 19 ++++++++++-- .../channels/wlwmanifest.aspx.designer.cs | 24 -------------- 10 files changed, 70 insertions(+), 109 deletions(-) delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.designer.cs diff --git a/src/Umbraco.Web.UI/umbraco/channels/rsd.aspx b/src/Umbraco.Web.UI/umbraco/channels/rsd.aspx index 20ec1882e8..98f32ff992 100644 --- a/src/Umbraco.Web.UI/umbraco/channels/rsd.aspx +++ b/src/Umbraco.Web.UI/umbraco/channels/rsd.aspx @@ -1,11 +1,20 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rsd.aspx.cs" Inherits="umbraco.presentation.umbraco.channels.rsd" %> + +<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %> +<%@ Import Namespace="Umbraco.Core.IO" %> + + umbraco http://umbraco.org/ http://<%=Request.ServerVariables["SERVER_NAME"]%> - <%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" /> - <%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" /> + <%=IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/channels.aspx" /> + <%=IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/channels.aspx" /> - + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/channels/wlwmanifest.aspx b/src/Umbraco.Web.UI/umbraco/channels/wlwmanifest.aspx index c14d5fa55d..9f4d7a135b 100644 --- a/src/Umbraco.Web.UI/umbraco/channels/wlwmanifest.aspx +++ b/src/Umbraco.Web.UI/umbraco/channels/wlwmanifest.aspx @@ -1,11 +1,33 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wlwmanifest.aspx.cs" Inherits="umbraco.presentation.channels.wlwmanifest" %> + +<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %> +<%@ Import Namespace="Umbraco.Core.IO" %> +<%@ Import Namespace="umbraco" %> + + http://umbraco.org/images/liveWriterIcon.png http://umbraco.org/images/liveWriterWatermark.png View your site/weblog Edit your site/weblog - {blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/ - {blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/actions/editContent.aspx?id={post-id} + {blog-homepage-url}<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/ + {blog-homepage-url}<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/actions/editContent.aspx?id={post-id} @@ -25,4 +47,5 @@ Yes Yes - \ No newline at end of file + + diff --git a/src/Umbraco.Web.UI/umbraco/settings/modals/ShowUmbracoTags.aspx b/src/Umbraco.Web.UI/umbraco/settings/modals/ShowUmbracoTags.aspx index ffa0426ec6..9663dc6e15 100644 --- a/src/Umbraco.Web.UI/umbraco/settings/modals/ShowUmbracoTags.aspx +++ b/src/Umbraco.Web.UI/umbraco/settings/modals/ShowUmbracoTags.aspx @@ -1,6 +1,7 @@ <%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="ShowUmbracoTags" Codebehind="ShowUmbracoTags.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.settings.modal.ShowUmbracoTags" %> +<%@ Import Namespace="Umbraco.Core.IO" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> @@ -44,9 +45,9 @@ MetaBlogApi / Content Channels - <link rel="EditURI" type="application/rsd+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/channels/rsd.aspx" /> + <link rel="EditURI" type="application/rsd+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/channels/rsd.aspx" />

- <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/channels/wlwmanifest.aspx" /> + <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/channels/wlwmanifest.aspx" />
Insert the above two elements to the head element to gain optimal support for diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 46acd7198f..c16128ce48 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -342,6 +342,12 @@ + + ASPXCodeBehind + + + ASPXCodeBehind + ASPXCodeBehind @@ -642,21 +648,7 @@ - - ASPXCodeBehind - rsd.aspx - - - rsd.aspx - - - ASPXCodeBehind - wlwmanifest.aspx - - - wlwmanifest.aspx - @@ -1892,8 +1884,6 @@ - - @@ -2049,7 +2039,9 @@ ASPXCodeBehind - + + ASPXCodeBehind + ASPXCodeBehind diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx deleted file mode 100644 index 20ec1882e8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx +++ /dev/null @@ -1,11 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rsd.aspx.cs" Inherits="umbraco.presentation.umbraco.channels.rsd" %> - - umbraco - http://umbraco.org/ - http://<%=Request.ServerVariables["SERVER_NAME"]%> - - <%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" /> - <%=umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/channels.aspx" /> - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs index 59ab1ad046..7686a48738 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Data; using System.Configuration; using System.Collections; @@ -11,6 +11,7 @@ using System.Web.UI.HtmlControls; namespace umbraco.presentation.umbraco.channels { + [Obsolete("This class is no longer used and will be removed from the codebase in future versions")] public partial class rsd : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.designer.cs deleted file mode 100644 index 857c10d11a..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/rsd.aspx.designer.cs +++ /dev/null @@ -1,15 +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.presentation.umbraco.channels { - - - public partial class rsd { - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx deleted file mode 100644 index c14d5fa55d..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wlwmanifest.aspx.cs" Inherits="umbraco.presentation.channels.wlwmanifest" %> - - http://umbraco.org/images/liveWriterIcon.png - http://umbraco.org/images/liveWriterWatermark.png - View your site/weblog - Edit your site/weblog - {blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/ - {blog-homepage-url}<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco)%>/actions/editContent.aspx?id={post-id} - - - - WebLayout - - - Yes - Yes - Yes - No - 100 - Yes - Yes - No - No - No - Yes - Yes - - \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs index f71178bceb..51b7b38335 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Data; using System.Configuration; using System.Collections; @@ -11,16 +11,29 @@ using System.Web.UI.HtmlControls; namespace umbraco.presentation.channels { + [Obsolete("This class is no longer used and will be removed from the codebase in future versions")] public partial class wlwmanifest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { bool useXhtml = false; - if (bool.TryParse(GlobalSettings.EditXhtmlMode, out useXhtml) && !useXhtml) { + if (bool.TryParse(GlobalSettings.EditXhtmlMode, out useXhtml) && !useXhtml) + { xhtml.Text = "no"; - } else { + } + else + { xhtml.Text = "yes"; } } + + /// + /// xhtml control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal xhtml; } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.designer.cs deleted file mode 100644 index d14ea3a40c..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/wlwmanifest.aspx.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.presentation.channels { - - - public partial class wlwmanifest { - - /// - /// xhtml control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal xhtml; - } -} From 9736aaafaa56712345f777fd66c0e215387cccf9 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Sat, 6 Apr 2013 00:09:43 +0600 Subject: [PATCH 6/6] Fixes authorize issue with insertchar.aspx --- .../umbraco/plugins/tinymce3/insertChar.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs index 1ffdf75020..478c1bdea7 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/insertChar.aspx.cs @@ -6,7 +6,7 @@ using System.Web.UI.WebControls; namespace umbraco.presentation.umbraco.plugins.tinymce3 { - public partial class insertChar : System.Web.UI.Page + public partial class insertChar : BasePages.UmbracoEnsuredPage { protected override void OnLoad(EventArgs e) {