www

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

commit 716ba660321baa0887439f440969584fbfea8e65
parent 9fea9608f6790428cc1e961dbce816c1a8d3fc6d
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 19 Apr 2016 05:20:53 -0400

Replace deprecated function call in sync code

Diffstat:
Mchrome/content/zotero/xpcom/sync/syncEngine.js | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js @@ -87,11 +87,11 @@ Zotero.Sync.Data.Engine.prototype.start = Zotero.Promise.coroutine(function* () } // Check if we've synced this library with the current architecture yet - var libraryVersion = Zotero.Libraries.getVersion(this.libraryID); + var libraryVersion = this.library.libraryVersion; if (!libraryVersion || libraryVersion == -1) { let versionResults = yield this._upgradeCheck(); if (versionResults) { - libraryVersion = Zotero.Libraries.getVersion(this.libraryID) + libraryVersion = this.library.libraryVersion; } // Perform a full sync if necessary, passing the getVersions() results if available. @@ -187,7 +187,7 @@ Zotero.Sync.Data.Engine.prototype.stop = function () { */ Zotero.Sync.Data.Engine.prototype._startDownload = Zotero.Promise.coroutine(function* () { var localChanges = false; - var libraryVersion = Zotero.Libraries.getVersion(this.libraryID); + var libraryVersion = this.library.libraryVersion; var lastLibraryVersion; var gen = Zotero.Utilities.Internal.delayGenerator( @@ -648,7 +648,7 @@ Zotero.Sync.Data.Engine.prototype._downloadObjects = Zotero.Promise.coroutine(fu * @return {Promise<Integer>} - An upload result code (this.UPLOAD_RESULT_*) */ Zotero.Sync.Data.Engine.prototype._startUpload = Zotero.Promise.coroutine(function* () { - var libraryVersion = Zotero.Libraries.getVersion(this.libraryID); + var libraryVersion = this.library.libraryVersion; var uploadNeeded = false; var objectIDs = {}; @@ -1014,7 +1014,7 @@ Zotero.Sync.Data.Engine.prototype._getJSONForObject = function (objectType, id) * by _fullSync() */ Zotero.Sync.Data.Engine.prototype._upgradeCheck = Zotero.Promise.coroutine(function* () { - var libraryVersion = Zotero.Libraries.getVersion(this.libraryID); + var libraryVersion = this.library.libraryVersion; if (libraryVersion) return; var lastLocalSyncTime = yield Zotero.DB.valueQueryAsync(