www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ab9545688f78e375c56913c584e50ea271eabf0d
parent 059460a5d21c19571ba2ebe3c6edc192a7c86bdd
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 17 Dec 2011 16:46:21 -0500

Fix Verify Server error display

Diffstat:
Mchrome/content/zotero/preferences/preferences.js | 2+-
Mchrome/content/zotero/xpcom/storage.js | 17+++++++++++------
Mchrome/content/zotero/xpcom/storage/module.js | 2+-
3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js @@ -322,7 +322,7 @@ function verifyStorageServer() { abortButton.hidden = false; progressMeter.hidden = false; - var requestHolder = Zotero.Sync.Storage.checkServer('webdav', function (uri, status, callback) { + var requestHolder = Zotero.Sync.Storage.checkServer('WebDAV', function (uri, status, callback) { verifyButton.hidden = false; abortButton.hidden = true; progressMeter.hidden = true; diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js @@ -826,12 +826,17 @@ Zotero.Sync.Storage = new function () { onSuccess: function () {}, onError: function (e) { Zotero.debug(e, 1); - callback(null, null, e); - throw (e); + callback(null, null, function () { + // If there's an error, just display that + Zotero.Utilities.Internal.errorPrompt(Zotero.getString('general.error'), e); + }); + return true; } - }); + }, false, "checkServer"); return module.checkServer(function (uri, status) { - callback(uri, status, module.checkServerCallback); + callback(uri, status, function () { + module.checkServerCallback(uri, status); + }); }); } @@ -845,7 +850,7 @@ Zotero.Sync.Storage = new function () { onError: function (e) { error(e); } - }); + }, false, "purgeDeletedStorageFiles"); module.purgeDeletedStorageFiles(callback); } @@ -859,7 +864,7 @@ Zotero.Sync.Storage = new function () { onError: function (e) { error(e); } - }); + }, false, "purgeOrphanedStorageFiles"); module.purgeOrphanedStorageFiles(callback); } diff --git a/chrome/content/zotero/xpcom/storage/module.js b/chrome/content/zotero/xpcom/storage/module.js @@ -163,7 +163,7 @@ Zotero.Sync.Storage.Module.prototype.checkServer = function (callback) { Zotero.Sync.Storage.Module.prototype.checkServerCallback = function (uri, status, window, skipSuccessMessage) { try { - return this._module.checkServerCallback(uri, status, authRequired, window, skipSuccessMessage); + return this._module.checkServerCallback(uri, status, window, skipSuccessMessage); } catch (e) { Zotero.Sync.Storage.EventManager.error(e);