From caf41376dccb50c6f2f477db31b6fb0fdd79c867 Mon Sep 17 00:00:00 2001 From: hartvig Date: Tue, 24 Apr 2012 11:50:33 -0200 Subject: [PATCH] More updates --- .../umbraco/controls/Images/ImageViewerUpdater.asmx.cs | 4 ++++ umbraco/presentation/umbraco/webservices/Developer.asmx.cs | 3 +++ .../umbraco/webservices/TagsAutoCompleteHandler.ashx.cs | 2 ++ .../presentation/umbraco/webservices/publication.asmx.cs | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs b/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs index b3491211a7..a93108357a 100644 --- a/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs +++ b/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs @@ -10,6 +10,7 @@ using umbraco.controls.Images; using System.IO; using System.Web.Script.Serialization; using umbraco.businesslogic.Utils; +using umbraco.presentation.webservices; namespace umbraco.controls.Images { @@ -36,6 +37,9 @@ namespace umbraco.controls.Images [WebMethod] public Dictionary UpdateImage(int mediaId, string style, string linkTarget) { + legacyAjaxCalls.Authorize(); + + //load the control with the specified properties and render the output as a string and return it Page page = new Page(); string path = umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/controls/Images/ImageViewer.ascx"; diff --git a/umbraco/presentation/umbraco/webservices/Developer.asmx.cs b/umbraco/presentation/umbraco/webservices/Developer.asmx.cs index 180ed1996b..2ecd9b52f9 100644 --- a/umbraco/presentation/umbraco/webservices/Developer.asmx.cs +++ b/umbraco/presentation/umbraco/webservices/Developer.asmx.cs @@ -7,6 +7,7 @@ using System.Web; using System.Web.Services; using System.Xml; +using umbraco.presentation.webservices; namespace umbraco.webservices { @@ -25,6 +26,8 @@ namespace umbraco.webservices [WebMethod] public string BootStrapTidy(string html, string ContextID) { + legacyAjaxCalls.Authorize(); + return cms.helpers.xhtml.BootstrapTidy(html); } diff --git a/umbraco/presentation/umbraco/webservices/TagsAutoCompleteHandler.ashx.cs b/umbraco/presentation/umbraco/webservices/TagsAutoCompleteHandler.ashx.cs index df46b418eb..95227bc57d 100644 --- a/umbraco/presentation/umbraco/webservices/TagsAutoCompleteHandler.ashx.cs +++ b/umbraco/presentation/umbraco/webservices/TagsAutoCompleteHandler.ashx.cs @@ -5,6 +5,7 @@ using System.Web; using System.Web.Services; using umbraco.DataLayer; using umbraco.BusinessLogic; +using umbraco.presentation.webservices; namespace umbraco.presentation.umbraco.webservices { @@ -18,6 +19,7 @@ namespace umbraco.presentation.umbraco.webservices public void ProcessRequest(HttpContext context) { + legacyAjaxCalls.Authorize(); context.Response.ContentType = "text/plain"; diff --git a/umbraco/presentation/umbraco/webservices/publication.asmx.cs b/umbraco/presentation/umbraco/webservices/publication.asmx.cs index 6b0a0cfc5c..56fbdf7ae0 100644 --- a/umbraco/presentation/umbraco/webservices/publication.asmx.cs +++ b/umbraco/presentation/umbraco/webservices/publication.asmx.cs @@ -2,6 +2,7 @@ using System; using System.ComponentModel; using System.Web.Services; using System.Web.Script.Services; +using umbraco.presentation.webservices; namespace umbraco.webservices { @@ -22,6 +23,8 @@ namespace umbraco.webservices [ScriptMethod] public int GetPublicationStatus(string key) { + legacyAjaxCalls.Authorize(); + try { return int.Parse(Application["publishDone" + key].ToString()); @@ -36,6 +39,8 @@ namespace umbraco.webservices [ScriptMethod] public int GetPublicationStatusMax(string key) { + legacyAjaxCalls.Authorize(); + try { return int.Parse(Application["publishTotal" + key].ToString()); @@ -68,6 +73,8 @@ namespace umbraco.webservices [WebMethod] public void SaveXmlCacheToDisk() { + legacyAjaxCalls.Authorize(); + content.Instance.PersistXmlToFile(); }