diff --git a/chrome/content/zotero/bindings/zoterosearch.xml b/chrome/content/zotero/bindings/zoterosearch.xml index 171e515fa6..137d7c6ec8 100644 --- a/chrome/content/zotero/bindings/zoterosearch.xml +++ b/chrome/content/zotero/bindings/zoterosearch.xml @@ -48,7 +48,7 @@ while(conditionsBox.hasChildNodes()) conditionsBox.removeChild(conditionsBox.firstChild); - var conditions = this.search.getSearchConditions(); + var conditions = this.search.getConditions(); for(var id in conditions) { @@ -131,7 +131,7 @@ // Default to an empty 'title' condition if (!ref) { - ref = this.search.getSearchCondition(this.search.addCondition("title","contains","")) + ref = this.search.getCondition(this.search.addCondition("title","contains","")) } condition.initWithParentAndCondition(this, ref); diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js index 01be720b0d..76c17bd2b9 100644 --- a/chrome/content/zotero/xpcom/search.js +++ b/chrome/content/zotero/xpcom/search.js @@ -84,7 +84,7 @@ Zotero.defineProperty(Zotero.Search.prototype, 'synced', { set: function(val) this._set('synced', val) }); Zotero.defineProperty(Zotero.Search.prototype, 'conditions', { - get: function() this.getSearchConditions() + get: function() this.getConditions() }); Zotero.Search.prototype._set = function (field, value) { @@ -286,7 +286,7 @@ Zotero.Search.prototype.clone = function (libraryID) { var s = new Zotero.Search(); s.libraryID = libraryID === undefined ? this.libraryID : libraryID; - var conditions = this.getSearchConditions(); + var conditions = this.getConditions(); for each(var condition in conditions) { var name = condition.mode ? @@ -471,7 +471,7 @@ Zotero.Search.prototype.removeCondition = Zotero.Promise.coroutine(function* (se * Returns an array with 'condition', 'operator', 'value', 'required' * for the given searchConditionID */ -Zotero.Search.prototype.getSearchCondition = function(searchConditionID){ +Zotero.Search.prototype.getCondition = function(searchConditionID){ this._requireData('conditions'); return this._conditions[searchConditionID]; } @@ -481,7 +481,7 @@ Zotero.Search.prototype.getSearchCondition = function(searchConditionID){ * Returns a multidimensional array of conditions/operator/value sets * used in the search, indexed by searchConditionID */ -Zotero.Search.prototype.getSearchConditions = function(){ +Zotero.Search.prototype.getConditions = function(){ this._requireData('conditions'); var conditions = []; for (var id in this._conditions) { @@ -851,7 +851,7 @@ Zotero.Search.prototype.serialize = function() { fields: { name: this.name, }, - conditions: this.getSearchConditions() + conditions: this.getConditions() }; return obj; } diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index 3726db3cc1..dce2879f14 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -4711,7 +4711,7 @@ Zotero.Sync.Server.Data = new function() { searchElem.setAttribute('dateAdded', search.dateAdded); searchElem.setAttribute('dateModified', search.dateModified); - var conditions = search.getSearchConditions(); + var conditions = search.getConditions(); if (conditions) { for each(var condition in conditions) { var conditionElem = doc.createElement('condition'); @@ -4770,7 +4770,7 @@ Zotero.Sync.Server.Data = new function() { if (mode) { name = name + '/' + mode; } - if (search.getSearchCondition(conditionID)) { + if (search.getCondition(conditionID)) { search.updateCondition( conditionID, name, @@ -4793,7 +4793,7 @@ Zotero.Sync.Server.Data = new function() { } conditionID++; - while (search.getSearchCondition(conditionID)) { + while (search.getCondition(conditionID)) { search.removeCondition(conditionID); conditionID++; }