Changeset 5
- Timestamp:
- 05/13/08 10:01:29 (2 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 18 edited
-
AssemblyInfo.cs (modified) (1 diff)
-
ChannelItem.cs (modified) (7 diffs)
-
ChannelItemPublishDateComparer.cs (modified) (3 diffs)
-
Constants.cs (modified) (4 diffs)
-
Controller.cs (modified) (7 diffs)
-
EmbeddedFeed.cs (modified) (3 diffs)
-
Feed.cs (modified) (4 diffs)
-
GlobalSettings.cs (modified) (3 diffs)
-
HttpRequest.cs (modified) (3 diffs)
-
ItemMiner.cs (modified) (5 diffs)
-
Items/FeedItem.cs (modified) (5 diffs)
-
Items/FeedItemFieldNames.cs (modified) (4 diffs)
-
Packages (added)
-
Packages/rss_module.zip (added)
-
Packages/rss_module_sources_v121.zip (added)
-
Packages/rssmodule.xml (added)
-
PublishingHandler.cs (modified) (3 diffs)
-
RssEmitterPage.cs (modified) (3 diffs)
-
Sitecore.Modules.RSS.csproj (modified) (1 diff)
-
StaticChannelItem.cs (modified) (3 diffs)
-
StaticFeed.cs (modified) (3 diffs)
-
TextUtils.cs (modified) (5 diffs)
-
UpdateFeedsCommand.cs (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/AssemblyInfo.cs
r4 r5 5 5 // associated with an assembly. 6 6 // 7 [assembly: AssemblyVersion("1.2. 1.0")]7 [assembly: AssemblyVersion("1.2.2.0")] 8 8 [assembly: AssemblyDescription("RSS Module generates RSS feeds from Sitecore content items")] 9 9 [assembly: AssemblyTitle("Sitecore RSS Module")] -
trunk/ChannelItem.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : ChannelItem.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 28 24 29 #region using 25 30 26 31 using System; 27 using System. Web;32 using System.Diagnostics; 28 33 using System.Xml; 29 34 using Sitecore.Data.Items; … … 35 40 #endregion using 36 41 37 38 42 namespace Sitecore.Modules.RSS 39 43 { … … 41 45 /// Single item in rss feed (channel) 42 46 /// </summary> 47 [DebuggerDisplay("{Title}, {PublishDate}")] 43 48 public class ChannelItem 44 49 { … … 78 83 { 79 84 DateTime date; 80 81 if (feed.FeedItem.IncludeUpdates) 85 if (!string.IsNullOrEmpty(feed.FeedItem.DateField)) 86 { 87 date = DateUtil.IsoDateToDateTime(item[feed.FeedItem.DateField]); 88 } 89 else if (feed.FeedItem.IncludeUpdates) 82 90 { 83 91 date = item.Statistics.Updated; … … 200 208 packet.AddElement("description", Description); 201 209 packet.AddElement("link", TextUtils.SafeUrl(Link)); 202 packet.AddElement("pubDate", PublishDate.To String("r"));210 packet.AddElement("pubDate", PublishDate.ToUniversalTime().ToString("r")); 203 211 204 212 if (feed.FeedItem.WriteAuthor) -
trunk/ChannelItemPublishDateComparer.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : ChannelItemPublishDateComparer.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 using System; -
trunk/Constants.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : Constants.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 23 25 * *********************************************************************** */ 24 26 27 #endregion 28 25 29 using Sitecore.Data; 26 30 27 31 namespace Sitecore.Modules.RSS 28 32 { 29 /// <summary>30 /// Module-wide constants31 /// </summary>32 public class Constants33 {33 /// <summary> 34 /// Module-wide constants 35 /// </summary> 36 public class Constants 37 { 34 38 /// <summary> 35 39 /// Name of the RSS device … … 56 60 /// </summary> 57 61 public static ID FeedTemplateID = ID.Parse("{79B49430-39B1-47B0-84E1-8FB067CEF307}"); 58 }62 } 59 63 } -
trunk/Controller.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : Controller.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 #region using … … 44 48 { 45 49 /// <summary> 46 /// Refreshes all feeds found in the database 50 /// Refreshes all feeds found in the database in the specified language 47 51 /// </summary> 48 52 /// <param name="database">Database to refresh feeds in</param> … … 50 54 public static void RefreshXmlFeeds(Database database, Language language) 51 55 { 56 Error.AssertNotNull(database, "database"); 57 Error.AssertLanguage(language, "language", false); 58 52 59 Item[] feeds = GetFeedsInDatabase(database, language); 53 60 … … 56 63 // Add nice message log message. Providing the version helps a lot in support, as the 57 64 // users often don't know what version they're actually using. 58 Log.Info( "Sitecore RSS Module: refreshing feeds in the database. "59 + Assembly.GetExecutingAssembly().FullName, typeof(Controller));65 Log.Info(string.Format("Sitecore RSS Module: refreshing feeds in {0} database, {1} language. Version: {2}", 66 database, language, Assembly.GetExecutingAssembly().FullName), typeof(Controller)); 60 67 61 68 foreach(Item feed in feeds) … … 63 70 ((FeedItem)feed).RefreshStaticFeed(); 64 71 } 72 } 73 } 74 75 /// <summary> 76 /// Refreshes all feeds found in the database in all languages 77 /// </summary> 78 /// <param name="database">Database to refresh feeds in</param> 79 public static void RefreshXmlFeeds(Database database) 80 { 81 Error.AssertNotNull(database, "database"); 82 83 foreach (Language language in database.Languages) 84 { 85 RefreshXmlFeeds(database, language); 65 86 } 66 87 } -
trunk/EmbeddedFeed.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : EmbeddedFeed.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 using Sitecore.Data.Items; -
trunk/Feed.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : Feed.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 #region using … … 279 283 packet.AddElement("description", feedItem.Description); 280 284 packet.AddElement("link", TextUtils.SafeUrl(Link)); 281 packet.AddElement("pubDate", DateTime.Now.To String("r"));282 packet.AddElement("lastBuildDate", GetLastBuildDate().To String("r"));285 packet.AddElement("pubDate", DateTime.Now.ToUniversalTime().ToString("r")); 286 packet.AddElement("lastBuildDate", GetLastBuildDate().ToUniversalTime().ToString("r")); 283 287 packet.AddElement("language", feedItem.InnerItem.Language.Name); 284 288 -
trunk/GlobalSettings.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : GlobalSettings.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 using Sitecore.Data; -
trunk/HttpRequest.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : HttpRequest.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 using Sitecore.Data.Items; -
trunk/ItemMiner.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : ItemMiner.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 #region using … … 83 87 string attribute; 84 88 85 if (feedItem.IncludeUpdates) 89 if (!string.IsNullOrEmpty(feedItem.DateField)) 90 { 91 attribute = "#" + feedItem.DateField + "#"; 92 } 93 else if (feedItem.IncludeUpdates) 86 94 { 87 95 attribute = "__updated"; … … 92 100 } 93 101 94 predicate = string.Format("@{0} > '{1}'", attribute, notOlderThan , includeField);102 predicate = string.Format("@{0} > '{1}'", attribute, notOlderThan); 95 103 } 96 104 -
trunk/Items/FeedItem.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : FeedItem.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 23 25 * *********************************************************************** */ 24 26 27 #endregion 25 28 26 29 #region using 27 30 28 31 using System; 29 using Sitecore. Data;32 using Sitecore.Configuration; 30 33 using Sitecore.Data.Items; 31 34 using Sitecore.IO; … … 96 99 if (result.Length > 0) 97 100 { 101 result = result.Replace("$(dataFolder)", Settings.DataFolder); 98 102 return FileUtil.MapPath(result); 99 103 } … … 281 285 282 286 /// <summary> 287 /// Provides the field that will be used to retrieve the publication date for each item of the feed 288 /// </summary> 289 public string DateField 290 { 291 get 292 { 293 return StringUtil.GetString(this[FeedItemFields.DateField], ""); 294 } 295 } 296 297 /// <summary> 283 298 /// Provides the field that will be used to retrieve the link for each item of the feed. 284 299 /// </summary> -
trunk/Items/FeedItemFieldNames.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : FeedItemFieldNames.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 23 25 * *********************************************************************** */ 24 26 27 #endregion 25 28 26 29 namespace Sitecore.Modules.RSS.Items … … 41 44 public const string TitleField = "Title Field"; 42 45 public const string DescriptionField = "Description Field"; 46 public const string DateField = "Date Field"; 43 47 public const string LinkField = "Link Field"; 44 48 public const string IncludeInFeedField = "Include In Feed Field"; -
trunk/PublishingHandler.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : PublishingHandler.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 #region using -
trunk/RssEmitterPage.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : RssEmitterPage.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 using System; -
trunk/Sitecore.Modules.RSS.csproj
r4 r5 148 148 <SubType>Code</SubType> 149 149 </Compile> 150 <Compile Include="UpdateFeedsCommand.cs" /> 150 151 </ItemGroup> 151 152 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
trunk/StaticChannelItem.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : StaticChannelItem.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 using System; -
trunk/StaticFeed.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : StaticFeed.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 22 24 * * 23 25 * *********************************************************************** */ 26 27 #endregion 24 28 25 29 using Sitecore.Data.Items; -
trunk/TextUtils.cs
r4 r5 1 #region license 2 1 3 /* *********************************************************************** * 2 4 * File : TextUtils.cs Part of Sitecore * … … 9 11 * Status : Published. * 10 12 * * 11 * Copyright (C) 1999-200 4by Sitecore A/S. All rights reserved. *13 * Copyright (C) 1999-2007 by Sitecore A/S. All rights reserved. * 12 14 * * 13 15 * This work is the property of: * … … 23 25 * *********************************************************************** */ 24 26 25 using System; 27 #endregion 26 28 27 29 namespace Sitecore.Modules.RSS … … 32 34 public class TextUtils 33 35 { 34 35 #region static utilities36 37 36 /// <summary> 38 37 /// Return safe URL … … 49 48 return result; 50 49 } 51 52 #endregion static utilities53 54 55 50 } 56 51 }
Note: See TracChangeset
for help on using the changeset viewer.
