From 2f9301e6f2fc07f6e15ac9d3fb869d1fc5ea71ba Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 15 Sep 2007 20:20:56 +0000 Subject: [PATCH] Fixes #696, dateAdded is null in toArray() before getField() is called --- chrome/content/zotero/xpcom/data_access.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/data_access.js b/chrome/content/zotero/xpcom/data_access.js index 04b21d724..29cd47488 100644 --- a/chrome/content/zotero/xpcom/data_access.js +++ b/chrome/content/zotero/xpcom/data_access.js @@ -2855,7 +2855,7 @@ Zotero.Items = new function(){ } // Should be the same as parts in Zotero.Item.loadFromID - var sql = 'SELECT I.itemID, I.itemTypeID, I.dateModified, ' + var sql = 'SELECT I.itemID, I.itemTypeID, I.dateAdded, I.dateModified, ' + getFirstCreatorSQL() + ', ' + "(SELECT COUNT(*) FROM itemNotes WHERE sourceItemID=I.itemID) AS numNotes, " + "(SELECT COUNT(*) FROM itemAttachments WHERE sourceItemID=I.itemID) AS numAttachments " @@ -2881,7 +2881,7 @@ Zotero.Items = new function(){ if (!arguments[0]) { _itemsLoaded = true; - _cachedFields = ['itemID', 'itemTypeID', 'dateModified', + _cachedFields = ['itemID', 'itemTypeID', 'dateAdded', 'dateModified', 'firstCreator', 'numNotes', 'numAttachments', 'numChildren']; } }