commit ae277391b63a16989635af7f3bf1b036e84d7aa3
parent 614232754ae99b39eb1c5f6523c927440b41e2cc
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 12 Nov 2015 02:48:41 -0500
Miscellaneous tweaks
Diffstat:
6 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js
@@ -1298,6 +1298,8 @@ Zotero.Attachments = new function(){
/**
+ * If necessary/possible, detect the file charset and index the file
+ *
* Since we have to load the content into the browser to get the
* character set (at least until we figure out a better way to get
* at the native detectors), we create the item above and update
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js
@@ -219,9 +219,7 @@ Zotero.HTTP = new function() {
var msg = "HTTP " + method + " " + dispURL + " failed: "
+ "Unexpected status code " + xmlhttp.status;
Zotero.debug(msg, 1);
- if (options.debug) {
- Zotero.debug(xmlhttp.responseText);
- }
+ Zotero.debug(xmlhttp.responseText, 1);
deferred.reject(new Zotero.HTTP.UnexpectedStatusException(xmlhttp, msg));
}
};
diff --git a/chrome/content/zotero/xpcom/sync/syncAPIClient.js b/chrome/content/zotero/xpcom/sync/syncAPIClient.js
@@ -89,9 +89,9 @@ Zotero.Sync.APIClient.prototype = {
getSettings: Zotero.Promise.coroutine(function* (libraryType, libraryTypeID, since) {
var params = {
- target: "settings",
libraryType: libraryType,
- libraryTypeID: libraryTypeID
+ libraryTypeID: libraryTypeID,
+ target: "settings"
};
if (since) {
params.since = since;
diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js
@@ -49,16 +49,7 @@ Zotero.Sync.Data.Engine = function (options) {
this.apiClient = options.apiClient;
this.libraryID = options.libraryID;
this.library = Zotero.Libraries.get(options.libraryID);
- switch (this.library.libraryType) {
- case 'user':
- case 'publications':
- this.libraryTypeID = Zotero.Users.getCurrentUserID();
- break;
-
- case 'group':
- this.libraryTypeID = Zotero.Groups.getGroupIDFromLibraryID(options.libraryID);
- break;
- }
+ this.libraryTypeID = this.library.libraryTypeID;
this.setStatus = options.setStatus || function () {};
this.onError = options.onError || function (e) {};
this.stopOnError = options.stopOnError;
diff --git a/test/content/support.js b/test/content/support.js
@@ -380,7 +380,7 @@ var installPDFTools = Zotero.Promise.coroutine(function* () {
* @return {Promise}
*/
function uninstallPDFTools() {
- return Zotero.Fulltext.removePDFTools();
+ return Zotero.Fulltext.uninstallPDFTools();
}
/**
diff --git a/test/tests/syncEngineTest.js b/test/tests/syncEngineTest.js
@@ -9,9 +9,7 @@ describe("Zotero.Sync.Data.Engine", function () {
var responses = {};
- var setup = Zotero.Promise.coroutine(function* (options) {
- options = options || {};
-
+ var setup = Zotero.Promise.coroutine(function* (options = {}) {
server = sinon.fakeServer.create();
server.autoRespond = true;
@@ -20,7 +18,6 @@ describe("Zotero.Sync.Data.Engine", function () {
caller.setLogger(msg => Zotero.debug(msg));
caller.stopOnError = true;
- Components.utils.import("resource://zotero/config.js");
var client = new Zotero.Sync.APIClient({
baseURL,
apiVersion: options.apiVersion || ZOTERO_CONFIG.API_VERSION,