www

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

commit 672ca5956eb9bc54c012cf66b6609217c16cdb0b
parent d6fa0455e1ffef517c4a0684282ed6164f7b28f4
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 27 Jun 2006 19:29:05 +0000

Fix the item creation SQL call to properly calculate the note count for numNotes()


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/data_access.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -70,7 +70,7 @@ Scholar.Item.prototype.loadFromID = function(id){ var sql = 'SELECT I.*, lastName || ' + 'CASE ((SELECT COUNT(*) FROM itemCreators WHERE itemID=' + id + ')>1) ' + "WHEN 0 THEN '' ELSE ' et al.' END AS firstCreator, " - + "(SELECT COUNT(*) FROM itemNotes WHERE itemID=I.itemID) AS numNotes " + + "(SELECT COUNT(*) FROM itemNotes WHERE sourceItemID=I.itemID) AS numNotes " + 'FROM items I ' + 'LEFT JOIN itemCreators IC ON (I.itemID=IC.itemID) ' + 'LEFT JOIN creators C ON (IC.creatorID=C.creatorID) ' @@ -1279,7 +1279,7 @@ Scholar.Items = new function(){ var sql = 'SELECT I.*, lastName || ' + 'CASE ((SELECT COUNT(*) FROM itemCreators WHERE itemID=I.itemID)>1) ' + "WHEN 0 THEN '' ELSE ' et al.' END AS firstCreator, " - + "(SELECT COUNT(*) FROM itemNotes WHERE itemID=I.itemID) AS numNotes " + + "(SELECT COUNT(*) FROM itemNotes WHERE sourceItemID=I.itemID) AS numNotes " + 'FROM items I ' + 'LEFT JOIN itemCreators IC ON (I.itemID=IC.itemID) ' + 'LEFT JOIN creators C ON (IC.creatorID=C.creatorID) '