From 1ba26a4dd10bf7a75920cadab9f8e3f5cfbac4ef Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 22 Jul 2016 12:19:55 +0200 Subject: [PATCH] Comment out this old code so it doesn't throw errors all the time --- .../macroScripts/Rss-CommunityBlogs.cshtml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/OurUmbraco.Site/macroScripts/Rss-CommunityBlogs.cshtml b/OurUmbraco.Site/macroScripts/Rss-CommunityBlogs.cshtml index ccecb9c4..14fe1a9f 100644 --- a/OurUmbraco.Site/macroScripts/Rss-CommunityBlogs.cshtml +++ b/OurUmbraco.Site/macroScripts/Rss-CommunityBlogs.cshtml @@ -1,34 +1,34 @@ @using System.Configuration @{ - var blogsXmlFile = Server.MapPath("~/App_Data/communityblogs.xml"); - - var random = Guid.NewGuid(); +// var blogsXmlFile = Server.MapPath("~/App_Data/communityblogs.xml"); - var yahooPipesId = ConfigurationManager.AppSettings["YahooPipesId"]; +// var random = Guid.NewGuid(); - var url = string.Format("http://pipes.yahoo.com/pipes/pipe.run?_id={0}&_render=rss&rnd={1}", yahooPipesId, random); +// var yahooPipesId = ConfigurationManager.AppSettings["YahooPipesId"]; - if(File.GetLastWriteTime(blogsXmlFile) < DateTime.Now.AddMinutes(-60)) - { - string html = ""; +// var url = string.Format("http://pipes.yahoo.com/pipes/pipe.run?_id={0}&_render=rss&rnd={1}", yahooPipesId, random); - using(WebClient client = new WebClient()) - { - html = client.DownloadString(url); - } +// if(File.GetLastWriteTime(blogsXmlFile) < DateTime.Now.AddMinutes(-60)) +// { +// string html = ""; - html = html.Replace(string.Format("http://pipes.yahoo.com/pipes/pipe.info?_id={0}", yahooPipesId), "http://our.umbraco.org/rss/communityblogs/"); - html = html.Replace(string.Format("http://pipes.yahoo.com/pipes/pipe.run?_id={0}&_render=rss&page=2", yahooPipesId), "http://our.umbraco.org/rss/communityblogs/"); - - using(StreamWriter writer = new StreamWriter(blogsXmlFile, false)) - { - writer.WriteLine(html); - } - } +// using(WebClient client = new WebClient()) +// { +// html = client.DownloadString(url); +// } - string blogs = File.ReadAllText(blogsXmlFile); - - Response.ContentType = "application/xml"; - Response.Write(blogs); +// html = html.Replace(string.Format("http://pipes.yahoo.com/pipes/pipe.info?_id={0}", yahooPipesId), "http://our.umbraco.org/rss/communityblogs/"); +// html = html.Replace(string.Format("http://pipes.yahoo.com/pipes/pipe.run?_id={0}&_render=rss&page=2", yahooPipesId), "http://our.umbraco.org/rss/communityblogs/"); + +// using(StreamWriter writer = new StreamWriter(blogsXmlFile, false)) +// { +// writer.WriteLine(html); +// } +// } + +// string blogs = File.ReadAllText(blogsXmlFile); + +// Response.ContentType = "application/xml"; +//Response.Write(blogs); } \ No newline at end of file