From 71e7fde327713dc9becea13e4f7f78af818bd26c Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 15 Aug 2013 13:42:08 -0400 Subject: [PATCH] Return multiple items from Zotero.Utilities.itemToServerJSON() --- chrome/content/zotero/xpcom/utilities.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 9362be1b46..b77b2b0e8d 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1255,10 +1255,11 @@ Zotero.Utilities = { }, /** - * Converts an item from toArray() format to content=json format used by the server + * Converts an item from toArray() format to an array of items in + * the content=json format used by the server */ "itemToServerJSON":function(item) { - var newItem = {}; + var newItem = {}, newItems = [newItem]; var typeID = Zotero.ItemTypes.getID(item.itemType); if(!typeID) { @@ -1337,7 +1338,6 @@ Zotero.Utilities = { } else if(field === "notes") { // normalize notes var n = val.length; - var newNotes = newItem.notes = new Array(n); for(var j=0; j