commit 7f3ec894d2332a34d66467c98db5d941aa745e03
parent 47ad73f0abdb688213234259aafb65790e4b9d73
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 9 Oct 2009 07:53:54 +0000
Upgraded libraries all defaulted to WebDAV syncing, even if WebDAV URL was blank -- default to Zotero File Storage instead if no URL
Diffstat:
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js
@@ -2454,13 +2454,19 @@ Zotero.Schema = new function(){
if (i==63) {
Zotero.DB.query("ALTER TABLE itemAttachments ADD COLUMN storageHash TEXT");
- var protocol = Zotero.Prefs.get('sync.storage.protocol');
- if (protocol == 'webdav') {
- Zotero.Prefs.set('sync.storage.scheme', 'http');
+ var url = Zotero.Prefs.get('sync.storage.url');
+ if (url) {
+ var protocol = Zotero.Prefs.get('sync.storage.protocol');
+ if (protocol == 'webdav') {
+ Zotero.Prefs.set('sync.storage.scheme', 'http');
+ }
+ else {
+ Zotero.Prefs.set('sync.storage.protocol', 'webdav');
+ Zotero.Prefs.set('sync.storage.scheme', 'https');
+ }
}
else {
- Zotero.Prefs.set('sync.storage.protocol', 'webdav');
- Zotero.Prefs.set('sync.storage.scheme', 'https');
+ Zotero.Prefs.set('sync.storage.protocol', 'zotero');
}
Zotero.DB.query("UPDATE version SET schema='storage_webdav' WHERE schema='storage'");