commit f7220378ddd3993cf89b3d29e8cd599283346db9
parent e02945b591b17ab9705771c3817c68e762e1b6ac
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date: Sat, 1 Nov 2014 19:18:14 -0500
Pass fixGaps to Zotero.Search.save() in an options object
Diffstat:
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/chrome/content/zotero/bindings/zoterosearch.xml b/chrome/content/zotero/bindings/zoterosearch.xml
@@ -232,7 +232,7 @@
<body>
<![CDATA[
this.updateSearch();
- return this.search.save(true);
+ return this.search.save({fixGaps: true});
]]>
</body>
</method>
diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js
@@ -445,7 +445,6 @@ Zotero.DataObject.prototype.editCheck = function () {
*/
Zotero.DataObject.prototype.save = Zotero.Promise.coroutine(function* (options) {
var env = {
- arguments: arguments,
transactionOptions: null,
options: options || {}
};
diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js
@@ -181,17 +181,8 @@ Zotero.Search.prototype._initSave = Zotero.Promise.coroutine(function* (env) {
return Zotero.Search._super.prototype._initSave.apply(this, arguments);
});
-/*
- * Save the search to the DB and return a savedSearchID
- *
- * If there are gaps in the searchConditionIDs, |fixGaps| must be true
- * and the caller must dispose of the search or reload the condition ids,
- * which may change after the save.
- *
- * For new searches, name must be set called before saving
- */
Zotero.Search.prototype._saveData = Zotero.Promise.coroutine(function* (env) {
- var fixGaps = env.arguments[0];
+ var fixGaps = env.options.fixGaps;
var isNew = env.isNew;
var searchID = env.id = this._id = this.id ? this.id : yield Zotero.ID.get('savedSearches');