diff --git a/UpgradeReadme.txt b/UpgradeReadme.txt index a24a1c7be8..541b216fbe 100644 --- a/UpgradeReadme.txt +++ b/UpgradeReadme.txt @@ -1,4 +1,4 @@ -* //TODO: All removed files will be in the umbraco.Legacy project +* //TODO: All removed files will be in the umbraco.Legacy project unless otherwise noted * DataType: 'editor' removed (editor.cs) * removed WysiwygDataType.cs @@ -18,4 +18,13 @@ exists in the current context, and if it doesn't it registers the scripts?) to use the UmbracoClientPath setting * removed CheckBoxTree.cs [permanently!, not in legacy package] -* removed windowCloser.cs \ No newline at end of file +* removed windowCloser.cs + +* All references to the old Client Dependency libraries have been removed completely. + +* Moved treeIcons.css to ~/umbraco_client/Tree/treeIcons.css + +* Removed all IFormHandler dependencies and therefore removed the idea of FormHandlers all together: +- IFormHandler +- /umbraco/formhandler.cs +- StandardFormHandlers \ No newline at end of file diff --git a/umbraco/interfaces/IFormhandler.cs b/umbraco/interfaces/IFormhandler.cs deleted file mode 100644 index 6e7ed20dc1..0000000000 --- a/umbraco/interfaces/IFormhandler.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Xml; -namespace umbraco.interfaces -{ - - /// - /// Umbraco form handler interface. Has a simple execute statement and a redirect ID. - /// - public interface IFormhandler - { - /// - /// Executes the specified form handler node. - /// - /// The form handler node. - /// - bool Execute(XmlNode formHandlerNode); - /// - /// Gets the redirect ID. - /// - /// The redirect ID. - int redirectID {get;} - } -} diff --git a/umbraco/interfaces/umbraco.interfaces.csproj b/umbraco/interfaces/umbraco.interfaces.csproj index 88be8cc4de..4c58994525 100644 --- a/umbraco/interfaces/umbraco.interfaces.csproj +++ b/umbraco/interfaces/umbraco.interfaces.csproj @@ -122,9 +122,6 @@ Code - - Code - Code diff --git a/umbraco/presentation/formHandler.cs b/umbraco/presentation/formHandler.cs deleted file mode 100644 index af241c14b4..0000000000 --- a/umbraco/presentation/formHandler.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Reflection; -using System.Xml; -using System.Xml.XPath; - -namespace umbraco -{ - /// - /// Summary description for formHandler. - /// - public class formHandler - { - private string _alias = ""; - private string _fhAssembly = ""; - private string _fhType = ""; - private XmlNode _formHandler; - public formHandler(string alias) - { - _alias = alias; - XmlDocument formHandlers = new XmlDocument(); - formHandlers.Load(System.Web.HttpContext.Current.Server.MapPath(GlobalSettings.Path + "/../config/formHandlers.config")); - _formHandler = formHandlers.SelectSingleNode("//formHandler [@alias='" + alias + "']"); - if (_formHandler != null) - { - _fhAssembly = _formHandler.Attributes.GetNamedItem("assembly").Value; - _fhType = _formHandler.Attributes.GetNamedItem("type").Value; - - } - } - - public int Execute() - { - int redirectID = -1; - try - { - // Reflect to execute and check whether the type is umbraco.main.IFormhandler - Assembly assembly = Assembly.LoadFrom(System.Web.HttpContext.Current.Server.MapPath(GlobalSettings.Path + "/../bin/"+_fhAssembly+".dll")); - Type type = assembly.GetType(_fhAssembly+"."+_fhType); - interfaces.IFormhandler typeInstance = Activator.CreateInstance(type) as interfaces.IFormhandler; - if (typeInstance != null) - { - typeInstance.Execute(_formHandler); - if (typeInstance.redirectID > 0) - { - redirectID = typeInstance.redirectID; - } - System.Web.HttpContext.Current.Trace.Write("formHandler", "Formhandler '" + _alias + "' executed with redirectID = " + redirectID); - } - else - System.Web.HttpContext.Current.Trace.Warn("formhandler", "Formhandler '" + _alias + "' doesn't implements interface umbraco.interfaces.IFormhandler"); - } - catch (Exception e) - { - System.Web.HttpContext.Current.Trace.Warn("formhandler", "Error implementing formhandler '" + _alias + "'", e); - } - - return redirectID; - } - } -} diff --git a/umbraco/presentation/requestHandler.cs b/umbraco/presentation/requestHandler.cs index 68af0b4238..99cce36b2f 100644 --- a/umbraco/presentation/requestHandler.cs +++ b/umbraco/presentation/requestHandler.cs @@ -320,23 +320,7 @@ namespace umbraco { } HttpContext.Current.Trace.Write("umbracoRequestHandler", "Access checking ended"); - // Run formhandler - if (HttpContext.Current.Request["umbracoAction"] != null) - if (HttpContext.Current.Request["umbracoAction"] != string.Empty) { - if (HttpContext.Current.Items["redir"] == null) { - string[] actions = helper.Request("umbracoAction").Split(','); - foreach (string action in actions) { - formHandler fh = new formHandler(action); - int redirectID = fh.Execute(); - if (redirectID > -1) { - HttpContext.Current.Items["redir"] = "1"; - requestHandler redirHandler = new requestHandler(null, redirectID.ToString()); - if (redirHandler.currentPage != null) - currentPage = redirHandler.currentPage; - } - } - } - } + } } diff --git a/umbraco/presentation/umbraco.presentation.csproj b/umbraco/presentation/umbraco.presentation.csproj index 5a2f1f0aaf..e2e54e9591 100644 --- a/umbraco/presentation/umbraco.presentation.csproj +++ b/umbraco/presentation/umbraco.presentation.csproj @@ -205,9 +205,6 @@ default.aspx - - Code - Global.asax Code @@ -486,13 +483,6 @@ insertMasterpagePlaceholder.aspx - - mediaPicker.aspx - ASPXCodeBehind - - - mediaPicker.aspx - republish.aspx ASPXCodeBehind @@ -1097,6 +1087,13 @@ tinymce3tinymceCompress.aspx + + insertMacro.aspx + ASPXCodeBehind + + + insertMacro.aspx + insertImage.aspx ASPXCodeBehind @@ -1111,13 +1108,6 @@ insertLink.aspx - - insertMacro.aspx - ASPXCodeBehind - - - insertMacro.aspx - paste.aspx ASPXCodeBehind @@ -1213,11 +1203,6 @@ sort.aspx - - MediaPickerService.asmx - Component - - TreeClientService.asmx Component @@ -1503,19 +1488,7 @@ - - - - - - - - - - - - @@ -1594,6 +1567,8 @@ + + @@ -1909,6 +1884,10 @@ + + + + SettingsSingleFileGenerator Settings.Designer.cs @@ -1946,6 +1925,8 @@ + + @@ -2314,6 +2295,9 @@ Form + + + Designer diff --git a/umbraco/presentation/web.config b/umbraco/presentation/web.config new file mode 100644 index 0000000000..f231558d4b --- /dev/null +++ b/umbraco/presentation/web.config @@ -0,0 +1,221 @@ + + + +
+ + + +
+ +
+
+
+
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://regexlib.com/WebServices.asmx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/umbraco/umbraco.Legacy/standardFormHandlers/formMail.cs b/umbraco/umbraco.Legacy/standardFormHandlers/formMail.cs deleted file mode 100644 index c46238c1ee..0000000000 --- a/umbraco/umbraco.Legacy/standardFormHandlers/formMail.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Web; -using System.Xml; -using System.Xml.XPath; -using System.Text; -using System.Web.Mail; -using System.IO; - -namespace umbraco.standardFormhandlers -{ - /// - /// Summary description for Class1. - /// - public class formMail : interfaces.IFormhandler - { - /// - /// Initializes a new instance of the class. - /// - public formMail() - { - // - // TODO: Add constructor logic here - // - } - #region IFormhandler Members - - private int _redirectID = -1; - - /// - /// Executes the specified formhandler node. - /// - /// The formhandler node. - /// - public bool Execute(XmlNode formhandlerNode) - { - StringBuilder builder = new StringBuilder(); - XmlDocument document = new XmlDocument(); - document.LoadXml(""); - if (helper.Request("umbHeader") != "") - { - builder.Append(helper.Request("umbheader")); - } - foreach (string text in HttpContext.Current.Request.Form.Keys) - { - if (text.StartsWith("umbForm")) - { - builder.Append("\n\n" + text.Replace("umbForm", "") + ": " + HttpContext.Current.Request.Form[text]); - document.DocumentElement.AppendChild(xmlHelper.addCDataNode(document, text.Replace("umbForm", ""), HttpContext.Current.Request.Form[text])); - } - } - if (helper.Request("umbFooter") != "") - { - builder.Append(helper.Request("umbFooter")); - } - string subject = helper.Request("umbSubject"); - if (subject.Trim() == "") - { - subject = formhandlerNode.SelectSingleNode("//parameter [@alias='subject']").FirstChild.Value; - } - if (helper.Request("umbFormNoXml") != "") - { - document = null; - } - this.sendMail(formhandlerNode.SelectSingleNode("//parameter [@alias='sender']").FirstChild.Value, HttpContext.Current.Request.Form["sendTo"], subject, builder.ToString(), formhandlerNode.SelectSingleNode("//parameter [@alias='debug']").FirstChild.Value, document); - if (helper.Request("umbExtraMailTo") != "") - { - this.sendMail(formhandlerNode.SelectSingleNode("//parameter [@alias='sender']").FirstChild.Value, helper.Request("umbExtraMailto"), subject, builder.ToString(), formhandlerNode.SelectSingleNode("//parameter [@alias='debug']").FirstChild.Value, document); - } - string redir = HttpContext.Current.Request["umbracoRedirect"].ToString(); - if ((redir != null) && (redir != "")) - { - this._redirectID = Convert.ToInt32(redir); - } - return true; - } - - - - - /// - /// Gets the redirect ID. - /// - /// The redirect ID. - public int redirectID - { - get - { - // TODO: Add formMail.redirectID getter implementation - return _redirectID; - } - } - - #endregion - - private void sendMail(string From, string To, string Subject, string Body, string Debug, XmlDocument XmlDoc) - { - System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(From, To); - message.Subject = Subject; - message.Body = Body; - Guid guid = Guid.NewGuid(); - string fileName = HttpContext.Current.Server.MapPath(GlobalSettings.StorageDirectory) + @"\" + guid.ToString() + ".xml"; - if (XmlDoc != null) - { - FileStream stream = File.Open(fileName, FileMode.Create); - StreamWriter writer = new StreamWriter(stream); - writer.WriteLine(XmlDoc.OuterXml); - writer.Close(); - stream.Close(); - message.Attachments.Add(new System.Net.Mail.Attachment(fileName)); - } - System.Net.Mail.SmtpClient smtpClient = new System.Net.Mail.SmtpClient(); - - try - { - smtpClient.Send(message); - if (Debug == "true") - { - HttpContext.Current.Response.Write(string.Concat(new string[] { "" })); - } - HttpContext.Current.Trace.Write("sendMail", string.Concat(new string[] { "Mail send from ", message.From.Address, " to ", message.To[0].Address, " through ", GlobalSettings.SmtpServer })); - } - catch (Exception exception) - { - HttpContext.Current.Trace.Warn("sendMail", string.Concat(new string[] { "Error sending mail from ", message.From.Address, " to ", message.To[0].Address, " through ", GlobalSettings.SmtpServer, "." }), exception); - if (Debug == "true") - { - string exp = ""; - while (exception.InnerException != null) - { - exp = exp + "--------------------------------\n"; - exp = exp + exception.InnerException.ToString() + ", \n"; - exception = exception.InnerException; - } - HttpContext.Current.Response.Write(string.Concat(new string[] { "" })); - } - return; - } - finally - { - if (XmlDoc != null) - { - File.Delete(fileName); - } - } - } - - - } -} diff --git a/umbraco/umbraco.Legacy/standardFormHandlers/memberLogoff.cs b/umbraco/umbraco.Legacy/standardFormHandlers/memberLogoff.cs deleted file mode 100644 index ed41973763..0000000000 --- a/umbraco/umbraco.Legacy/standardFormHandlers/memberLogoff.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Xml; - -namespace umbraco.standardFormhandlers -{ - /// - /// Summary description for memberLogoff. - /// - public class memberLogoff : interfaces.IFormhandler - { - /// - /// Initializes a new instance of the class. - /// - public memberLogoff() - { - } - - #region IFormhandler Members - - private int _redirectID = -1; - - /// - /// Executes the specified formhandler node. - /// - /// The formhandler node. - /// - public bool Execute(XmlNode formhandlerNode) - { - int _currentMemberId = cms.businesslogic.member.Member.CurrentMemberId(); - if (_currentMemberId > 0 ) - cms.businesslogic.member.Member.ClearMemberFromClient(_currentMemberId); - return true; - } - - /// - /// Gets the redirect ID. - /// - /// The redirect ID. - public int redirectID - { - get - { - // TODO: Add formMail.redirectID getter implementation - return _redirectID; - } - } - - #endregion - } -} diff --git a/umbraco/umbraco.Legacy/standardFormHandlers/validateLogin.cs b/umbraco/umbraco.Legacy/standardFormHandlers/validateLogin.cs deleted file mode 100644 index a4811b092c..0000000000 --- a/umbraco/umbraco.Legacy/standardFormHandlers/validateLogin.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Xml; - -namespace umbraco.standardFormhandlers -{ - /// - /// Summary description for validateLogin. - /// - public class validateLogin : interfaces.IFormhandler - { - /// - /// Initializes a new instance of the class. - /// - public validateLogin() - { - } - - #region IFormhandler Members - - private int _redirectID = -1; - - /// - /// Executes the specified formhandler node. - /// - /// The formhandler node. - /// - public bool Execute(XmlNode formhandlerNode) - { - bool temp = false; - if (helper.Request("umbracoMemberLogin") != "" && helper.Request("umbracoMemberPassword") != "") - { - cms.businesslogic.member.Member m = cms.businesslogic.member.Member.GetMemberFromLoginNameAndPassword(helper.Request("umbracoMemberLogin"), helper.Request("umbracoMemberPassword")); - if (m != null) - { - System.Web.HttpContext.Current.Trace.Write("validateLogin", "Member found..."); - cms.businesslogic.member.Member.AddMemberToCache(m); - temp = true; - } else - System.Web.HttpContext.Current.Trace.Write("validateLogin", "No member found..."); - } else - System.Web.HttpContext.Current.Trace.Write("validateLogin", "No login or password requested..."); - return temp; - } - - /// - /// Gets the redirect ID. - /// - /// The redirect ID. - public int redirectID - { - get - { - // TODO: Add formMail.redirectID getter implementation - return _redirectID; - } - } - - #endregion - } -} diff --git a/umbraco/umbraco.Legacy/umbraco.Legacy.csproj b/umbraco/umbraco.Legacy/umbraco.Legacy.csproj index 2b817d246e..230c83314b 100644 --- a/umbraco/umbraco.Legacy/umbraco.Legacy.csproj +++ b/umbraco/umbraco.Legacy/umbraco.Legacy.csproj @@ -70,9 +70,6 @@ - - - edit.aspx ASPXCodeBehind