fix 266893 rss feeds stop working if .msf file deleted sr=mscott

This commit is contained in:
bienvenu%nventure.com 2004-11-24 18:56:20 +00:00
Родитель bd596ad3f5
Коммит 4efdec0fb9
2 изменённых файлов: 29 добавлений и 5 удалений

Просмотреть файл

@ -42,14 +42,39 @@ var nsNewsBlogFeedDownloader =
if (!gExternalScriptsLoaded)
loadScripts();
// we don't yet support thee ability to check for new articles while we are in the middle of
// we don't yet support the ability to check for new articles while we are in the middle of
// subscribing to a feed. For now, abort the check for new feeds.
if (progressNotifier.mSubscribeMode)
{
debug('Aborting RSS New Mail Check. Feed subscription in progress\n');
return;
}
// if folder seems to have lost its feeds, look in DS for feeds.
if (!aUrl.length)
{
var ds = getSubscriptionsDS(aFolder.server);
var enumerator = ds.GetSources(FZ_DESTFOLDER, aFolder, true);
var concatenatedUris = "";
while (enumerator.hasMoreElements())
{
var containerArc = enumerator.getNext();
var uri = containerArc.QueryInterface(Components.interfaces.nsIRDFResource).Value;
if (concatenatedUris.length > 0)
concatenatedUris += "|";
concatenatedUris += uri;
}
if (concatenatedUris.length > 0)
{
aUrl = concatenatedUris;
try
{
var msgdb = aFolder.getMsgDatabase(null);
var folderInfo = msgdb.dBFolderInfo;
folderInfo.setCharPtrProperty("feedUrl", concatenatedUris);
}
catch (ex) {dump(ex);}
}
}
// aUrl may be a delimited list of feeds for a particular folder. We need to kick off a download
// for each feed.

Просмотреть файл

@ -216,9 +216,8 @@ NS_IMETHODIMP nsRssIncomingServer::GetNewMail(nsIMsgWindow *aMsgWindow, nsIUrlLi
aFolder->GetName(getter_Copies(folderName));
folderInfo->GetCharPtrProperty("feedUrl", getter_Copies(url));
if (!url.IsEmpty())
rv = rssDownloader->DownloadFeed(url.get(),
aFolder, PR_FALSE, folderName.get(), aUrlListener, aMsgWindow);
rv = rssDownloader->DownloadFeed(url.get(),
aFolder, PR_FALSE, folderName.get(), aUrlListener, aMsgWindow);
}
}
}