diff --git a/umbraco/presentation/Global.asax.cs b/umbraco/presentation/Global.asax.cs index 482b8d8398..41a2d53e7c 100644 --- a/umbraco/presentation/Global.asax.cs +++ b/umbraco/presentation/Global.asax.cs @@ -14,21 +14,45 @@ namespace umbraco /// public class Global : HttpApplication { - protected virtual void Session_Start(Object sender, EventArgs e) - { - if(GlobalSettings.EnableStat) - { - try - { - new Session(); - } - catch(Exception state) - { - Log.Add(LogTypes.Error, BusinessLogic.User.GetUser(0), -1, "Error initializing stat: " + state); - } - } - } + protected virtual void Application_Start(object sender, EventArgs e) + { + } + + protected virtual void Session_Start(Object sender, EventArgs e) + { + if (GlobalSettings.EnableStat) + { + try + { + new Session(); + } + catch (Exception state) + { + Log.Add(LogTypes.Error, BusinessLogic.User.GetUser(0), -1, "Error initializing stat: " + state); + } + } + } + + protected virtual void Application_BeginRequest(object sender, EventArgs e) + { + + } + + protected virtual void Application_AuthenticateRequest(object sender, EventArgs e) + { + + } + + protected virtual void Application_Error(object sender, EventArgs e) + { + + } + + protected virtual void Session_End(object sender, EventArgs e) + { + + } protected virtual void Application_End(Object sender, EventArgs e) { diff --git a/umbraco/presentation/macro.cs b/umbraco/presentation/macro.cs index 5d86149d40..8a99ab4121 100644 --- a/umbraco/presentation/macro.cs +++ b/umbraco/presentation/macro.cs @@ -633,7 +633,7 @@ namespace umbraco catch (Exception e) { // inner exception code by Daniel Lindström from SBBS.se - Exception ie = e.InnerException; + Exception ie = e; while (ie != null) { HttpContext.Current.Trace.Warn("umbracoMacro InnerException", ie.Message, ie); diff --git a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs index 1b695af697..c0365f6926 100644 --- a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs +++ b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs @@ -11,6 +11,7 @@ using ClientDependency.Core; using umbraco.cms.helpers; using umbraco.IO; using umbraco.presentation; +using umbraco.cms.businesslogic; namespace umbraco.controls { @@ -199,17 +200,20 @@ namespace umbraco.controls if (!Page.IsPostBack) { string chosenContentTypeIDs = ""; - foreach (cms.businesslogic.ContentType ct in cType.GetAll()) + ContentType[] contentTypes = cType.GetAll(); + foreach (cms.businesslogic.ContentType ct in contentTypes.OrderBy(x => x.Text)) { ListItem li = new ListItem(ct.Text, ct.Id.ToString()); dualAllowedContentTypes.Items.Add(li); lstAllowedContentTypes.Items.Add(li); foreach (int i in allowedIds) + { if (i == ct.Id) { li.Selected = true; chosenContentTypeIDs += ct.Id + ","; } + } } dualAllowedContentTypes.Value = chosenContentTypeIDs; }