Bug 727818 - 'New Groups' subscribe uses LIST instead of NEWGROUPS. r=bienvenu
authorJoshua Cranmer <Pidgeot18@gmail.com>
Sat, 10 Mar 2012 21:08:28 -0600
changeset 11055 594a1c24f23fcebae8f16d6bf1e55c6e0d53bdc3
parent 11054 5d0e20c979050cbb43db085867b0b0ed77bcec15
child 11056 541d14e0846361f4bd083e994eb0d87d32f9a428
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbienvenu
bugs727818
Bug 727818 - 'New Groups' subscribe uses LIST instead of NEWGROUPS. r=bienvenu
mailnews/news/src/nsNntpService.cpp
--- a/mailnews/news/src/nsNntpService.cpp
+++ b/mailnews/news/src/nsNntpService.cpp
@@ -1626,26 +1626,33 @@ nsNntpService::GetListOfGroupsOnServer(n
   NS_ENSURE_ARG_POINTER(aNntpServer);
 
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(aNntpServer, &rv);
   if (NS_FAILED(rv)) return rv;
   if (!server) return NS_ERROR_FAILURE;
 
   nsCString serverUri;
   rv = server->GetServerURI(serverUri);
+  nsNewsAction newsAction;
   if (aGetOnlyNew)
+  {
     serverUri.AppendLiteral("/?newgroups");
+    newsAction = nsINntpUrl::ActionListNewGroups;
+  }
   else
+  {
     serverUri.AppendLiteral("/*");
+    newsAction = nsINntpUrl::ActionListGroups;
+  }
 
   nsCOMPtr <nsIUrlListener> listener = do_QueryInterface(aNntpServer, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIURI> url;
-  rv = ConstructNntpUrl(serverUri.get(), listener, aMsgWindow, nsnull, nsINntpUrl::ActionListGroups, getter_AddRefs(url));
+  rv = ConstructNntpUrl(serverUri.get(), listener, aMsgWindow, nsnull, newsAction, getter_AddRefs(url));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // now run the url to add the rest of the groups
   return RunNewsUrl(url, aMsgWindow, nsnull);
 }
 
 
 NS_IMETHODIMP