www

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

commit feca078284841d8d038fb3155ca1379cd61deef5
parent 6a12bfd521f9bb83dbf7e872b02de4e0ac690f1e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 27 Aug 2010 19:21:01 +0000

Clarify comments


Diffstat:
Mchrome/content/zotero/xpcom/data/collection.js | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js @@ -620,8 +620,10 @@ Zotero.Collection.prototype.save = function () { /** -* Add an item to the collection -**/ + * Add an item to the collection + * + * Warning: Operates on DB directly without separate save() + */ Zotero.Collection.prototype.addItem = function(itemID) { var current = this.getChildItems(true); if (current && current.indexOf(itemID) != -1) { @@ -659,6 +661,8 @@ Zotero.Collection.prototype.addItem = function(itemID) { /** * Add multiple items to the collection in batch + * + * Warning: Operates on DB directly without separate save() */ Zotero.Collection.prototype.addItems = function(itemIDs) { if (!itemIDs || !itemIDs.length) { @@ -736,8 +740,10 @@ Zotero.Collection.prototype.addItems = function(itemIDs) { /** -* Remove an item from the collection (does not delete item from library) -**/ + * Remove an item from the collection (does not delete item from library) + * + * Warning: Operates on DB directly without separate save() + */ Zotero.Collection.prototype.removeItem = function(itemID) { var childItems = this.getChildItems(true, true); if (childItems) { @@ -775,6 +781,8 @@ Zotero.Collection.prototype.removeItem = function(itemID) { /** * Remove multiple items from the collection in batch * (does not delete item from library) + * + * Warning: Operates on DB directly without separate save() */ Zotero.Collection.prototype.removeItems = function(itemIDs) { if (!itemIDs || !itemIDs.length) {