зеркало из https://github.com/mozilla/pjs.git
added wizard to setup service and get login information for new users
updated server pointers to point to the new services.mozilla.com backend
This commit is contained in:
Родитель
d4c815234e
Коммит
55474654a1
|
@ -1154,13 +1154,29 @@ DAVCollection.prototype = {
|
|||
}
|
||||
|
||||
// fixme: hacktastic
|
||||
let hello = /Hello (.+)@mozilla.com/.exec(event.target.responseText)
|
||||
if (hello) {
|
||||
this._currentUserPath = hello[1];
|
||||
this._currentUser = this._currentUserPath + "@mozilla.com";
|
||||
this._baseURL = "http://dotmoz.mozilla.org/~" +
|
||||
this._currentUserPath + "/";
|
||||
}
|
||||
// let hello = /Hello (.+)@mozilla.com/.exec(event.target.responseText)
|
||||
// let hello = /Index of/.exec(event.target.responseText)
|
||||
// if (hello) {
|
||||
// this._currentUserPath = hello[1];
|
||||
// this._currentUser = this._currentUserPath + "@mozilla.com";
|
||||
// this._baseURL = "http://dotmoz.mozilla.org/~" +
|
||||
// this._currentUserPath + "/";
|
||||
// }
|
||||
|
||||
// XXX we need to refine some server response codes
|
||||
let branch = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefBranch);
|
||||
this._currentUser = branch.getCharPref("browser.places.sync.username");
|
||||
|
||||
// XXX
|
||||
let path = this._currentUser.split("@");
|
||||
this._currentUserPath = path[0];
|
||||
|
||||
LOG("currentUser: "+this._currentUser);
|
||||
LOG("currentUSerPath: "+this._currentUserPath);
|
||||
|
||||
let serverURL = branch.getCharPref("browser.places.sync.serverURL");
|
||||
this._baseURL = serverURL + this._currentUserPath + "/";
|
||||
|
||||
this._loggedIn = true;
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
pref("browser.places.sync.serverURL", "http://dotmoz.mozilla.org/");
|
||||
pref("browser.places.sync.serverURL", "https://services.mozilla.com/user/");
|
||||
pref("browser.places.sync.username", "nobody@mozilla.com");
|
||||
pref("extensions.sync.lastversion", "firstrun");
|
||||
pref("extensions.sync.lastsync", "");
|
||||
pref("extensions.sync.remember", false);
|
||||
|
||||
pref("extensions.sync.autoconnect", false);
|
||||
pref("extensions.sync.lastsync", "0");
|
||||
|
|
Загрузка…
Ссылка в новой задаче