From e239b69d76feb94fdceb73203cc64090402a6f0e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 23 Sep 2009 06:59:43 +0000 Subject: [PATCH] - Restore error icon if WebDAV verification fails during sync and settings are filled in - Display slightly more helpful message on unknown error - Missing file from previous commit --- chrome/content/zotero/xpcom/storage.js | 3 ++- chrome/content/zotero/xpcom/storage/session.js | 4 ++-- chrome/content/zotero/xpcom/storage/webdav.js | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index 50d1f6edb1..c3fd037b6d 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -99,7 +99,8 @@ Zotero.Sync.Storage = new function () { } else { Zotero.debug(_session.name + " verification failed"); - _callbacks.onSkip(); + _callbacks.onError(_session.name + " verification failed. Verify your " + + "WebDAV settings in the Sync pane of the Zotero preferences."); } } diff --git a/chrome/content/zotero/xpcom/storage/session.js b/chrome/content/zotero/xpcom/storage/session.js index 17a6336539..fd2a8be0ad 100644 --- a/chrome/content/zotero/xpcom/storage/session.js +++ b/chrome/content/zotero/xpcom/storage/session.js @@ -138,9 +138,9 @@ Zotero.Sync.Storage.Session.prototype.checkServer = function (callback) { } } -Zotero.Sync.Storage.Session.prototype.checkServerCallback = function (uri, status, authRequired, window, skipSuccessMessage) { +Zotero.Sync.Storage.Session.prototype.checkServerCallback = function (uri, status, authRequired, window, skipSuccessMessage, error) { try { - return this._session.checkServerCallback(uri, status, authRequired, window, skipSuccessMessage); + return this._session.checkServerCallback(uri, status, authRequired, window, skipSuccessMessage, error); } catch (e) { this.onError(e); diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js index 5311545de7..710fbc0e1f 100644 --- a/chrome/content/zotero/xpcom/storage/webdav.js +++ b/chrome/content/zotero/xpcom/storage/webdav.js @@ -1027,6 +1027,10 @@ Zotero.Sync.Storage.Session.WebDAV.prototype.checkServerCallback = function (uri }); return false; + + case Zotero.Sync.Storage.ERROR_UNKNOWN: + var errorMessage = "An unknown error occurred. Check your WebDAV settings and server configuration."; + break; } if (!skipSuccessMessage) {