Bug 743467 - Don't get feedUrls in the account folder or trash folder. r+a=dbienvenu
authoralta88 <alta88@gmail.com>
Wed, 11 Apr 2012 08:21:00 -0400
changeset 10718 4002af09bc21810417175e72460c4b481843aaa4
parent 10717 be6985999277f36be68ebedfa141f0adb091cb56
child 10719 df26107591e11a2bc18f80e12e831ba55b2b008d
push idunknown
push userunknown
push dateunknown
bugs743467
Bug 743467 - Don't get feedUrls in the account folder or trash folder. r+a=dbienvenu
mailnews/extensions/newsblog/content/utils.js
--- a/mailnews/extensions/newsblog/content/utils.js
+++ b/mailnews/extensions/newsblog/content/utils.js
@@ -359,16 +359,20 @@ function deleteFeed(aId, aServer, aParen
  * If folder move/renames are fixed, remove msgDatabase accesses and get the
  * list directly from the feeds db.
  * 
  * @param  nsIMsgFolder - the folder.
  * @return array of urls, or null if none.
  */
 function getFeedUrlsInFolder(aFolder)
 {
+  if (aFolder.isServer || aFolder.getFlag(Ci.nsMsgFolderFlags.Trash))
+    // Never any feedUrls in the account folder or trash folder.
+    return null;
+
   let feedUrlArray = [];
 
   let feedurls = aFolder.getStringProperty("feedUrl");
   if (feedurls)
     return feedurls.split(kFeedUrlDelimiter);
 
   // Go to msgDatabase for the property, make sure to handle errors.
   let msgDb;