зеркало из https://github.com/mozilla/gecko-dev.git
Bug 36816 news should default to using the server username and password for all groups p=johannesteichmann@web.de r=bienvenu sr=mscott
This commit is contained in:
Родитель
dda2fff88d
Коммит
070e42ff42
|
@ -353,6 +353,7 @@ pref("mail.server.default.fetch_by_chunks", true);
|
||||||
pref("mail.server.default.mime_parts_on_demand", true);
|
pref("mail.server.default.mime_parts_on_demand", true);
|
||||||
|
|
||||||
pref("mail.server.default.always_authenticate",false);
|
pref("mail.server.default.always_authenticate",false);
|
||||||
|
pref("mail.server.default.singleSignon", true);
|
||||||
pref("mail.server.default.max_articles", 500);
|
pref("mail.server.default.max_articles", 500);
|
||||||
pref("mail.server.default.notify.on", true);
|
pref("mail.server.default.notify.on", true);
|
||||||
pref("mail.server.default.mark_old_read", false);
|
pref("mail.server.default.mark_old_read", false);
|
||||||
|
|
|
@ -63,6 +63,9 @@ interface nsINntpIncomingServer : nsISupports {
|
||||||
/* abbreviate the newsgroup names in the folder pane? */
|
/* abbreviate the newsgroup names in the folder pane? */
|
||||||
attribute boolean abbreviate;
|
attribute boolean abbreviate;
|
||||||
|
|
||||||
|
/* do we use a single login per server or do we login per group */
|
||||||
|
attribute boolean singleSignon;
|
||||||
|
|
||||||
/* the server keeps track of all the newsgroups we are subscribed to */
|
/* the server keeps track of all the newsgroups we are subscribed to */
|
||||||
void addNewsgroup(in string name);
|
void addNewsgroup(in string name);
|
||||||
void removeNewsgroup(in string name);
|
void removeNewsgroup(in string name);
|
||||||
|
|
|
@ -1244,8 +1244,32 @@ nsresult nsMsgNewsFolder::CreateNewsgroupUrlForSignon(const char *inUriStr, cons
|
||||||
nsCOMPtr<nsIURL> url = do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
|
nsCOMPtr<nsIURL> url = do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
|
||||||
NS_ENSURE_SUCCESS(rv,rv);
|
NS_ENSURE_SUCCESS(rv,rv);
|
||||||
|
|
||||||
|
nsCOMPtr<nsIMsgIncomingServer> server;
|
||||||
|
rv = GetServer(getter_AddRefs(server));
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
nsCOMPtr<nsINntpIncomingServer> nntpServer;
|
||||||
|
rv = GetNntpServer(getter_AddRefs(nntpServer));
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
PRBool singleSignon = PR_TRUE;
|
||||||
|
rv = nntpServer->GetSingleSignon(&singleSignon);
|
||||||
|
|
||||||
|
if (singleSignon)
|
||||||
|
{
|
||||||
|
|
||||||
|
nsXPIDLCString serverURI;
|
||||||
|
rv = server->GetServerURI(getter_Copies(serverURI));
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
rv = url->SetSpec(serverURI);
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
rv = url->SetSpec(nsDependentCString(inUriStr));
|
rv = url->SetSpec(nsDependentCString(inUriStr));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
}
|
||||||
|
|
||||||
rv = url->GetPort(&port);
|
rv = url->GetPort(&port);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
|
@ -156,6 +156,7 @@ NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, NotifyOn, "notify.on")
|
||||||
NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, MarkOldRead, "mark_old_read")
|
NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, MarkOldRead, "mark_old_read")
|
||||||
NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, Abbreviate, "abbreviate")
|
NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, Abbreviate, "abbreviate")
|
||||||
NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, PushAuth, "always_authenticate")
|
NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, PushAuth, "always_authenticate")
|
||||||
|
NS_IMPL_SERVERPREF_BOOL(nsNntpIncomingServer, SingleSignon, "singleSignon")
|
||||||
NS_IMPL_SERVERPREF_INT(nsNntpIncomingServer, MaxArticles, "max_articles")
|
NS_IMPL_SERVERPREF_INT(nsNntpIncomingServer, MaxArticles, "max_articles")
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
@ -353,6 +353,7 @@ pref("mail.server.default.fetch_by_chunks", true);
|
||||||
pref("mail.server.default.mime_parts_on_demand", true);
|
pref("mail.server.default.mime_parts_on_demand", true);
|
||||||
|
|
||||||
pref("mail.server.default.always_authenticate",false);
|
pref("mail.server.default.always_authenticate",false);
|
||||||
|
pref("mail.server.default.singleSignon", true);
|
||||||
pref("mail.server.default.max_articles", 500);
|
pref("mail.server.default.max_articles", 500);
|
||||||
pref("mail.server.default.notify.on", true);
|
pref("mail.server.default.notify.on", true);
|
||||||
pref("mail.server.default.mark_old_read", false);
|
pref("mail.server.default.mark_old_read", false);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче